test: stabilize sandbox/doctor tests
This commit is contained in:
@@ -1,16 +1,20 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("sandbox config merges", () => {
|
||||
it("resolves sandbox scope deterministically", async () => {
|
||||
const { resolveSandboxScope } = await import("./sandbox.js");
|
||||
it(
|
||||
"resolves sandbox scope deterministically",
|
||||
{ timeout: 15_000 },
|
||||
async () => {
|
||||
const { resolveSandboxScope } = await import("./sandbox.js");
|
||||
|
||||
expect(resolveSandboxScope({})).toBe("agent");
|
||||
expect(resolveSandboxScope({ perSession: true })).toBe("session");
|
||||
expect(resolveSandboxScope({ perSession: false })).toBe("shared");
|
||||
expect(resolveSandboxScope({ perSession: true, scope: "agent" })).toBe(
|
||||
"agent",
|
||||
);
|
||||
});
|
||||
expect(resolveSandboxScope({})).toBe("agent");
|
||||
expect(resolveSandboxScope({ perSession: true })).toBe("session");
|
||||
expect(resolveSandboxScope({ perSession: false })).toBe("shared");
|
||||
expect(resolveSandboxScope({ perSession: true, scope: "agent" })).toBe(
|
||||
"agent",
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
it("merges sandbox docker env and ulimits (agent wins)", async () => {
|
||||
const { resolveSandboxDockerConfig } = await import("./sandbox.js");
|
||||
|
||||
Reference in New Issue
Block a user