Skip to content

Commit 3210f76

Browse files
Jason Barnettclaude
authored andcommitted
test(git-clone): add test for clone_args variable
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent cdbb663 commit 3210f76

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

registry/coder/modules/git-clone/main.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,4 +261,18 @@ describe("git-clone", async () => {
261261
expect(output.stdout).toContain("Running post-clone script...");
262262
expect(output.stdout).toContain("Post-clone script executed");
263263
});
264+
265+
it("runs with clone_args", async () => {
266+
const state = await runTerraformApply(import.meta.dir, {
267+
agent_id: "foo",
268+
url: "https://github.com/michaelbrewer/repo-tests.log",
269+
clone_args: "--depth 1 --single-branch",
270+
});
271+
const output = await executeScriptInContainer(state, "alpine/git");
272+
expect(output.exitCode).toBe(0);
273+
expect(output.stdout).toEqual([
274+
"Creating directory ~/repo-tests.log...",
275+
"Cloning https://github.com/michaelbrewer/repo-tests.log to ~/repo-tests.log...",
276+
]);
277+
});
264278
});

0 commit comments

Comments
 (0)