Skip to content

Commit a1729c5

Browse files
ndeloofglours
andcommitted
Update pkg/e2e/watch_test.go
Co-authored-by: Guillaume Lours <[email protected]> Signed-off-by: Nicolas De loof <[email protected]> Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 254224c commit a1729c5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pkg/e2e/watch_test.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -292,17 +292,15 @@ func doTest(t *testing.T, svcName string) {
292292
}
293293

294294
func TestWatchExec(t *testing.T) {
295-
cli := NewCLI(t)
295+
c := NewCLI(t)
296296
const projectName = "test_watch_exec"
297297

298-
t.Cleanup(func() {
299-
cli.RunDockerComposeCmd(t, "-p", projectName, "down")
300-
})
298+
defer c.cleanupWithDown(t, projectName)
301299

302300
tmpdir := t.TempDir()
303301
composeFilePath := filepath.Join(tmpdir, "compose.yaml")
304302
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")
306304
buffer := bytes.NewBuffer(nil)
307305
cmd.Stdout = buffer
308306
watch := icmd.StartCmd(cmd)
@@ -327,5 +325,5 @@ func TestWatchExec(t *testing.T) {
327325
}
328326
return poll.Continue("%v", out)
329327
})
330-
cli.RunDockerComposeCmdNoCheck(t, "-p", projectName, "kill", "-s", "9")
328+
c.RunDockerComposeCmdNoCheck(t, "-p", projectName, "kill", "-s", "9")
331329
}

0 commit comments

Comments
 (0)