From 147c7f503ca3b88772bc5a4641ca5d6f25a48ec8 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Thu, 28 May 2015 16:13:42 +0100 Subject: [PATCH] add curl test for proxy v1.0 api support --- test/620_proxy_entrypoint_command_test.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/620_proxy_entrypoint_command_test.sh b/test/620_proxy_entrypoint_command_test.sh index e03b9a10..d216077d 100755 --- a/test/620_proxy_entrypoint_command_test.sh +++ b/test/620_proxy_entrypoint_command_test.sh @@ -32,4 +32,22 @@ weave_on $HOST1 launch-proxy --with-ipam assert_raises "proxy docker_on $HOST1 run check-ethwe-up" +create_container_json=$(cat <<-EOF +{ + "Hostname":"c1", + "AttachStdin":false, + "AttachStdout":true, + "AttachStderr":true, + "Tty":false, + "OpenStdin":false, + "StdinOnce":false, + "Image":"check-ethwe-up" +} +EOF +) + +# Test a minimal request to the unversioned (v1.0) docker api +CONTAINER_ID=$(curl -s -X POST --header "Content-Type: application/json" http://$HOST1:12375/containers/create -d "$create_container_json" | sed -e 's/.*"Id":"\([^"]*\)".*/\1/') +assert_raises "proxy docker_on $HOST1 start -ai $CONTAINER_ID" + end_suite