mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 09:10:42 +00:00
test: tighten e2e absence assertions
This commit is contained in:
@@ -495,7 +495,7 @@ describe("openshell sandbox backend e2e", () => {
|
||||
await bridge.writeFile({ filePath: "nested/remote-only.txt", data: "hello-remote\n" });
|
||||
await expect(
|
||||
fs.readFile(path.join(workspaceDir, "nested", "remote-only.txt"), "utf8"),
|
||||
).rejects.toThrow();
|
||||
).rejects.toMatchObject({ code: "ENOENT" });
|
||||
await expect(bridge.readFile({ filePath: "nested/remote-only.txt" })).resolves.toEqual(
|
||||
Buffer.from("hello-remote\n"),
|
||||
);
|
||||
|
||||
@@ -462,7 +462,9 @@ describe("scripts/docker/setup.sh", () => {
|
||||
expect(result.stderr).toContain("Sandbox requires Docker CLI");
|
||||
const log = await readDockerLog(activeSandbox);
|
||||
expect(log).toContain("config set agents.defaults.sandbox.mode off");
|
||||
await expect(stat(join(activeSandbox.rootDir, "docker-compose.sandbox.yml"))).rejects.toThrow();
|
||||
await expect(
|
||||
stat(join(activeSandbox.rootDir, "docker-compose.sandbox.yml")),
|
||||
).rejects.toMatchObject({ code: "ENOENT" });
|
||||
});
|
||||
|
||||
it("skips sandbox gateway restart when sandbox config writes fail", async () => {
|
||||
@@ -499,7 +501,7 @@ describe("scripts/docker/setup.sh", () => {
|
||||
expect(forceRecreateLine).not.toContain("docker-compose.sandbox.yml");
|
||||
await expect(
|
||||
stat(join(activeSandbox.rootDir, "docker-compose.sandbox.yml")),
|
||||
).rejects.toThrow();
|
||||
).rejects.toMatchObject({ code: "ENOENT" });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user