Move check that container exited after inspecting container, hopefully this will fix flakyness ont his test

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
Guillaume Tardif 2021-01-12 17:26:27 +01:00
parent 4a4e6be1cb
commit 48421622c0
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,6 @@ func TestLocalComposeRun(t *testing.T) {
assert.Assert(t, strings.HasPrefix(containerID, "run-test_back_run_"), containerID)
truncatedSlug = strings.Replace(containerID, "run-test_back_run_", "", 1)
runContainerID = containerID
assert.Assert(t, strings.Contains(line, "Exited"), line)
}
if strings.HasPrefix(containerID, "run-test_db_1") {
assert.Assert(t, strings.Contains(line, "Up"), line)
@ -134,6 +133,7 @@ func TestLocalComposeRun(t *testing.T) {
}
assert.Assert(t, runContainerID != "")
res = c.RunDockerCmd("inspect", runContainerID)
res.Assert(t, icmd.Expected{Out: ` "Status": "exited"`})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.container-number": "1"`})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.project": "run-test"`})
res.Assert(t, icmd.Expected{Out: `"com.docker.compose.oneoff": "True",`})