File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
registry/coder/modules/git-clone Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff 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} ) ;
You can’t perform that action at this time.
0 commit comments