Skip to content

Commit 994b267

Browse files
committed
test(gateway): retarget session-utils mock keys after alias removal
1 parent 657bc4f commit 994b267

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎src/gateway/server-methods/sessions.send-followup-status.test.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { expectSubagentFollowupReactivation } from "./subagent-followup.test-hel
1111
import type { GatewayRequestContext, RespondFn } from "./types.js";
1212

1313
const loadSessionEntryMock = vi.fn();
14-
const loadSessionEntryReadOnlyMock = vi.fn();
14+
const loadGatewaySessionEntryReadOnlyMock = vi.fn();
1515
const readSessionMessageCountAsyncMock = vi.fn();
1616
const loadGatewaySessionRowMock = vi.fn();
1717
const resolveDeletedAgentIdFromSessionKeyMock = vi.fn();
@@ -49,7 +49,8 @@ vi.mock("../../auto-reply/reply/queue/cleanup.js", async () => {
4949

5050
vi.mock("../session-utils.js", () => ({
5151
loadSessionEntry: (...args: unknown[]) => loadSessionEntryMock(...args),
52-
loadGatewaySessionEntryReadOnly: (...args: unknown[]) => loadSessionEntryReadOnlyMock(...args),
52+
loadGatewaySessionEntryReadOnly: (...args: unknown[]) =>
53+
loadGatewaySessionEntryReadOnlyMock(...args),
5354
loadGatewaySessionRow: (...args: unknown[]) => loadGatewaySessionRowMock(...args),
5455
resolveDeletedAgentIdFromSessionKey: (...args: unknown[]) =>
5556
resolveDeletedAgentIdFromSessionKeyMock(...args),
@@ -113,7 +114,7 @@ function createRequestContext(overrides: Record<string, unknown> = {}): GatewayR
113114
describe("sessions.send completed subagent follow-up status", () => {
114115
beforeEach(() => {
115116
loadSessionEntryMock.mockReset();
116-
loadSessionEntryReadOnlyMock.mockReset();
117+
loadGatewaySessionEntryReadOnlyMock.mockReset();
117118
readSessionMessageCountAsyncMock.mockReset().mockResolvedValue(0);
118119
loadGatewaySessionRowMock.mockReset();
119120
resolveDeletedAgentIdFromSessionKeyMock.mockReset().mockReturnValue(null);

‎src/tui/embedded-backend.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ vi.mock("../gateway/session-utils.js", () => ({
232232
loadCombinedSessionStoreForGatewayMock(...args),
233233
loadSessionEntry: (sessionKey: string, opts?: { agentId?: string }) =>
234234
loadSessionEntryMock(sessionKey, opts),
235-
loadSessionEntryReadOnly: (sessionKey: string, opts?: { agentId?: string }) =>
235+
loadGatewaySessionEntryReadOnly: (sessionKey: string, opts?: { agentId?: string }) =>
236236
loadSessionEntryMock(sessionKey, opts),
237237
resolveCanonicalGatewaySessionStoreKey: ({ key }: { key: string }) => ({
238238
primaryKey: key,

0 commit comments

Comments
 (0)