mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-28 03:10:36 +00:00
test: finish sqlite test migration
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user