mirror of https://github.com/docker/compose.git
Merge pull request #482 from docker/region_aci_tests
Change ACI test region to eastus2. Improve error output when waiting for container status
This commit is contained in:
commit
3859312c17
|
@ -52,7 +52,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
contextName = "aci-test"
|
contextName = "aci-test"
|
||||||
location = "westeurope"
|
location = "eastus2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var binDir string
|
var binDir string
|
||||||
|
@ -665,12 +665,14 @@ func getContainerName(stdout string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func waitForStatus(t *testing.T, c *E2eCLI, containerID string, status string) {
|
func waitForStatus(t *testing.T, c *E2eCLI, containerID string, status string) {
|
||||||
checkStopped := func(t poll.LogT) poll.Result {
|
checkStopped := func(logt poll.LogT) poll.Result {
|
||||||
res := c.RunDockerCmd("inspect", containerID)
|
res := c.RunDockerCmd("inspect", containerID)
|
||||||
if strings.Contains(res.Stdout(), status) {
|
containerInspect, err := ParseContainerInspect(res.Stdout())
|
||||||
|
assert.NilError(t, err)
|
||||||
|
if containerInspect.Status == status {
|
||||||
return poll.Success()
|
return poll.Success()
|
||||||
}
|
}
|
||||||
return poll.Continue("waiting for container to stop")
|
return poll.Continue("Status %s != %s (expected) for container %s", containerInspect.Status, status, containerID)
|
||||||
}
|
}
|
||||||
|
|
||||||
poll.WaitOn(t, checkStopped, poll.WithDelay(5*time.Second), poll.WithTimeout(60*time.Second))
|
poll.WaitOn(t, checkStopped, poll.WithDelay(5*time.Second), poll.WithTimeout(60*time.Second))
|
||||||
|
|
Loading…
Reference in New Issue