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:
Guillaume Tardif 2020-08-14 12:19:52 +02:00 committed by GitHub
commit 3859312c17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -52,7 +52,7 @@ import (
const (
contextName = "aci-test"
location = "westeurope"
location = "eastus2"
)
var binDir string
@ -665,12 +665,14 @@ func getContainerName(stdout string) 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)
if strings.Contains(res.Stdout(), status) {
containerInspect, err := ParseContainerInspect(res.Stdout())
assert.NilError(t, err)
if containerInspect.Status == status {
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))