Test calling 'start' with a HOST_CONFIG not supplied to 'create'
This commit is contained in:
1 parent
6fce798164
commit
a45e5ac152
1 file changed
+15
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#! /bin/bash
|
||||
|
||||
. ./config.sh
|
||||
|
||||
start_suite "Abuse of 'start' operation"
|
||||
|
||||
weave_on $HOST1 launch
|
||||
|
||||
proxy_start_container $HOST1 --name=c1
|
||||
proxy docker_on $HOST1 create --name=c2 $SMALL_IMAGE grep "^1$" /sys/class/net/ethwe/carrier
|
||||
# Now start c2 with a sneaky HostConfig
|
||||
curl -X POST -H Content-Type:application/json -d '{"HostConfig": {"NetworkMode": "container:c1"}}' http://$HOST1:12375/containers/c2/start
|
||||
assert "docker_on $HOST1 inspect -f '{{.State.Running}} {{.State.ExitCode}}' c2" "false 0"
|
||||
|
||||
end_suite
|
||||
Reference in new issue
Block a user