mirror of https://github.com/docker/compose.git
Update pkg/e2e/watch_test.go
Co-authored-by: Guillaume Lours <705411+glours@users.noreply.github.com> Signed-off-by: Nicolas De loof <nicolas.deloof@gmail.com> Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
254224c182
commit
a1729c52de
|
@ -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)
|
||||
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue