From a45e5ac1525065a3a480a59e8044c04fc8c53e8a Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 28 Aug 2015 16:20:31 +0100 Subject: [PATCH] Test calling 'start' with a HOST_CONFIG not supplied to 'create' --- test/666_the_beast.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 test/666_the_beast.sh diff --git a/test/666_the_beast.sh b/test/666_the_beast.sh new file mode 100755 index 00000000..a0073532 --- /dev/null +++ b/test/666_the_beast.sh @@ -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