Skip to content

Commit

Permalink
Update pkg/e2e/watch_test.go
Browse files Browse the repository at this point in the history
Co-authored-by: Guillaume Lours <[email protected]>
Signed-off-by: Nicolas De loof <[email protected]>
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof and glours committed Dec 6, 2024
1 parent 254224c commit a1729c5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/e2e/watch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,17 +292,15 @@ func doTest(t *testing.T, svcName string) {
}

func TestWatchExec(t *testing.T) {
cli := NewCLI(t)
c := NewCLI(t)
const projectName = "test_watch_exec"

t.Cleanup(func() {
cli.RunDockerComposeCmd(t, "-p", projectName, "down")
})
defer c.cleanupWithDown(t, projectName)

tmpdir := t.TempDir()
composeFilePath := filepath.Join(tmpdir, "compose.yaml")
CopyFile(t, filepath.Join("fixtures", "watch", "exec.yaml"), composeFilePath)
cmd := cli.NewDockerComposeCmd(t, "-p", projectName, "-f", composeFilePath, "up", "--watch")
cmd := c.NewDockerComposeCmd(t, "-p", projectName, "-f", composeFilePath, "up", "--watch")
buffer := bytes.NewBuffer(nil)
cmd.Stdout = buffer
watch := icmd.StartCmd(cmd)
Expand All @@ -327,5 +325,5 @@ func TestWatchExec(t *testing.T) {
}
return poll.Continue("%v", out)
})
cli.RunDockerComposeCmdNoCheck(t, "-p", projectName, "kill", "-s", "9")
c.RunDockerComposeCmdNoCheck(t, "-p", projectName, "kill", "-s", "9")
}

0 comments on commit a1729c5

Please sign in to comment.