Merge pull request #568 from docker/ecs_e2e_down

Wait only for the first “DELETE_COMPLETE” line when running `docker compose down`
This commit is contained in:
Guillaume Tardif 2020-09-01 10:11:11 +02:00 committed by GitHub
commit 217da21514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -116,7 +116,17 @@ func TestCompose(t *testing.T) {
})
t.Run("compose down", func(t *testing.T) {
c.RunDockerCmd("compose", "down", "--project-name", stack, "-f", "../composefiles/nginx.yaml")
cmd := c.NewDockerCmd("compose", "down", "--project-name", stack)
res := icmd.StartCmd(cmd)
checkUp := func(t poll.LogT) poll.Result {
out := res.Stdout()
if !strings.Contains(out, "DELETE_COMPLETE") {
return poll.Continue("current status \n%s\n", out)
}
return poll.Success()
}
poll.WaitOn(t, checkUp, poll.WithDelay(2*time.Second), poll.WithTimeout(60*time.Second))
})
}