Skip to content

Commit 9edb677

Browse files
committed
Fix test to check runtimeTempDir instead of .cmux/tmp subdirectory
The test 'should use tmpfile policy by default' was checking for files in .cmux/tmp subdirectory, which was the path used in the initial (incorrect) fix. Now that overflow files are written directly to runtimeTempDir, the test needs to check the tempDir.path directly.
1 parent 8d8d8f1 commit 9edb677

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/services/tools/bash.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ describe("bash tool", () => {
270270
it("should use tmpfile policy by default when overflow_policy not specified", async () => {
271271
const tempDir = new TestTempDir("test-bash-default");
272272
const tool = createBashTool({
273-
cwd: tempDir.path, // Use tempDir as cwd so we can verify file creation
273+
cwd: process.cwd(),
274274
runtime: createRuntime({ type: "local", srcBaseDir: "/tmp" }),
275275
runtimeTempDir: tempDir.path,
276276
// overflow_policy not specified - should default to tmpfile
@@ -290,10 +290,9 @@ describe("bash tool", () => {
290290
expect(result.error).toContain("saved to");
291291
expect(result.error).not.toContain("[OUTPUT TRUNCATED");
292292

293-
// Verify temp file was created in .cmux/tmp subdirectory
294-
const cmuxTmpDir = path.join(tempDir.path, ".cmux", "tmp");
295-
expect(fs.existsSync(cmuxTmpDir)).toBe(true);
296-
const files = fs.readdirSync(cmuxTmpDir);
293+
// Verify temp file was created in runtimeTempDir
294+
expect(fs.existsSync(tempDir.path)).toBe(true);
295+
const files = fs.readdirSync(tempDir.path);
297296
const bashFiles = files.filter((f) => f.startsWith("bash-"));
298297
expect(bashFiles.length).toBe(1);
299298
}

0 commit comments

Comments
 (0)