test: finish sqlite test migration

This commit is contained in:
Peter Steinberger
2026-05-15 23:06:31 +01:00
parent ccb7872480
commit 769f8da80a
3 changed files with 3 additions and 7 deletions

View File

@@ -1091,7 +1091,7 @@ describe("shouldSkipLocalCliCredentialEpoch", () => {
});
it("passes current turn kind into bundle MCP loopback env", async () => {
const { dir, sessionFile } = createSessionFile();
const { dir } = createTranscriptStateFixture();
try {
const getActiveMcpLoopbackRuntime = vi.fn(() => ({
port: 31783,
@@ -1126,7 +1126,6 @@ describe("shouldSkipLocalCliCredentialEpoch", () => {
const context = await prepareCliRunContext({
sessionId: "session-test",
sessionKey: "agent:main:telegram:group:chat123",
sessionFile,
workspaceDir: dir,
prompt: "latest ask",
provider: "native-cli",

View File

@@ -476,14 +476,13 @@ describe("agentCommand", () => {
it("installs a local gateway request scope for embedded agent dispatch", async () => {
await withTempHome(async (home) => {
const store = path.join(home, "sessions.json");
mockConfig(home, store);
mockConfig(home);
const { getPluginRuntimeGatewayRequestScope } =
await import("../plugins/runtime/gateway-request-scope.js");
vi.mocked(attemptExecutionRuntime.runAgentAttempt).mockImplementationOnce(async () => {
const scope = getPluginRuntimeGatewayRequestScope();
expect(scope?.context?.getRuntimeConfig()).toMatchObject({
session: { store },
session: { mainKey: "main" },
});
return createDefaultAgentResult();
});

View File

@@ -26,7 +26,6 @@ const {
} = vi.hoisted(() => ({
appendAssistantMessageToSessionTranscriptMock: vi.fn().mockResolvedValue({
ok: true,
sessionFile: "session.jsonl",
messageId: "mirror-message",
}),
countActiveDescendantRunsMock: vi.fn().mockReturnValue(0),
@@ -314,7 +313,6 @@ describe("dispatchCronDelivery — double-announce guard", () => {
vi.mocked(ensureOutboundSessionEntry).mockResolvedValue(undefined);
vi.mocked(appendAssistantMessageToSessionTranscript).mockResolvedValue({
ok: true,
sessionFile: "session.jsonl",
messageId: "mirror-message",
});
maybeApplyTtsToPayloadMock.mockReset().mockImplementation(async (params) => params.payload);