@@ -292,17 +292,15 @@ func doTest(t *testing.T, svcName string) {
292
292
}
293
293
294
294
func TestWatchExec (t * testing.T ) {
295
- cli := NewCLI (t )
295
+ c := NewCLI (t )
296
296
const projectName = "test_watch_exec"
297
297
298
- t .Cleanup (func () {
299
- cli .RunDockerComposeCmd (t , "-p" , projectName , "down" )
300
- })
298
+ defer c .cleanupWithDown (t , projectName )
301
299
302
300
tmpdir := t .TempDir ()
303
301
composeFilePath := filepath .Join (tmpdir , "compose.yaml" )
304
302
CopyFile (t , filepath .Join ("fixtures" , "watch" , "exec.yaml" ), composeFilePath )
305
- cmd := cli .NewDockerComposeCmd (t , "-p" , projectName , "-f" , composeFilePath , "up" , "--watch" )
303
+ cmd := c .NewDockerComposeCmd (t , "-p" , projectName , "-f" , composeFilePath , "up" , "--watch" )
306
304
buffer := bytes .NewBuffer (nil )
307
305
cmd .Stdout = buffer
308
306
watch := icmd .StartCmd (cmd )
@@ -327,5 +325,5 @@ func TestWatchExec(t *testing.T) {
327
325
}
328
326
return poll .Continue ("%v" , out )
329
327
})
330
- cli .RunDockerComposeCmdNoCheck (t , "-p" , projectName , "kill" , "-s" , "9" )
328
+ c .RunDockerComposeCmdNoCheck (t , "-p" , projectName , "kill" , "-s" , "9" )
331
329
}
0 commit comments