Merge pull request #1537 from weaveworks/1502-flakey-test
Wait until container exits in test to remove race condition Fixes #1502
This commit is contained in:
commit
aac5fb8c24
1 file changed
+2
@@ -11,11 +11,13 @@ proxy_start_container $HOST1 --name=c1
|
||||
# Start c2 with a sneaky HostConfig
|
||||
proxy docker_on $HOST1 create --name=c2 $SMALL_IMAGE $CHECK_ETHWE_UP
|
||||
proxy docker_api_on $HOST1 POST /containers/c2/start '{"NetworkMode": "container:c1"}'
|
||||
docker_on $HOST1 attach c2 >/dev/null || true # Wait for container to exit
|
||||
assert "docker_on $HOST1 inspect -f '{{.State.Running}} {{.State.ExitCode}} {{.HostConfig.Dns}}' c2" "false 0 [$docker_bridge_ip]"
|
||||
|
||||
# Start c3 with HostConfig having empty binds and null dns/networking settings
|
||||
proxy docker_on $HOST1 create --name=c3 -v /tmp:/hosttmp $SMALL_IMAGE $CHECK_ETHWE_UP
|
||||
proxy docker_api_on $HOST1 POST /containers/c3/start '{"Binds":[],"Dns":null,"DnsSearch":null,"ExtraHosts":null,"VolumesFrom":null,"Devices":null,"NetworkMode":""}'
|
||||
docker_on $HOST1 attach c3 >/dev/null || true # Wait for container to exit
|
||||
assert "docker_on $HOST1 inspect -f '{{.State.Running}} {{.State.ExitCode}} {{.HostConfig.Dns}}' c3" "false 0 [$docker_bridge_ip]"
|
||||
|
||||
# Start c4 with an 'null' HostConfig
|
||||
|
||||
Reference in new issue
Block a user