mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 13:50:23 +00:00
test: stabilize slow contract and integration suites
This commit is contained in:
@@ -8,6 +8,8 @@ import {
|
||||
runWithModelFallbackMock,
|
||||
} from "./run.test-harness.js";
|
||||
|
||||
const RUN_OWNER_AUTH_TIMEOUT_MS = 300_000;
|
||||
|
||||
const runCronIsolatedAgentTurn = await loadRunCronIsolatedAgentTurn();
|
||||
|
||||
function makeParams() {
|
||||
@@ -55,11 +57,19 @@ describe("runCronIsolatedAgentTurn owner auth", () => {
|
||||
vi.stubEnv("OPENCLAW_TEST_FAST", previousFastTestEnv);
|
||||
});
|
||||
|
||||
it("passes senderIsOwner=true to isolated cron agent runs", async () => {
|
||||
await runCronIsolatedAgentTurn(makeParams());
|
||||
it(
|
||||
"passes senderIsOwner=true to isolated cron agent runs",
|
||||
{ timeout: RUN_OWNER_AUTH_TIMEOUT_MS },
|
||||
async () => {
|
||||
await runCronIsolatedAgentTurn(makeParams());
|
||||
|
||||
expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);
|
||||
const senderIsOwner = runEmbeddedPiAgentMock.mock.calls[0]?.[0]?.senderIsOwner;
|
||||
expect(senderIsOwner).toBe(true);
|
||||
});
|
||||
expect(runEmbeddedPiAgentMock).toHaveBeenCalledTimes(1);
|
||||
const senderIsOwner = runEmbeddedPiAgentMock.mock.calls[0]?.[0]?.senderIsOwner;
|
||||
expect(senderIsOwner).toBe(true);
|
||||
|
||||
const toolNames = createOpenClawCodingTools({ senderIsOwner }).map((tool) => tool.name);
|
||||
expect(toolNames).toContain("cron");
|
||||
expect(toolNames).toContain("gateway");
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user