From 157910ec9a7e6fa6c4c2e34d2972f53b576258fe Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Wed, 5 Aug 2015 10:52:06 +0100 Subject: [PATCH] adding integration test for proxy handling large http chunks --- test/655_proxy_large_http_chunks_test.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 test/655_proxy_large_http_chunks_test.sh diff --git a/test/655_proxy_large_http_chunks_test.sh b/test/655_proxy_large_http_chunks_test.sh new file mode 100755 index 00000000..c3c6ac9f --- /dev/null +++ b/test/655_proxy_large_http_chunks_test.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +. ./config.sh + +start_suite "Check the proxy handles arbitrarily large http chunks" +# docker images returns all its data as one giant http chunk. + +base=scratch +for i in `seq 0 4`; do + docker_on $HOST1 build -t image$i >/dev/null - <<-EOF + FROM $base + LABEL image${i}_biglabel "$(printf %8192s)" +EOF + base=image$i +done + +# Sanity-check that it's big enough to cause issues. +assert_raises "test $(curl -s http://$HOST1:$DOCKER_PORT/v1.19/images/json?all=true | wc -c) -gt 65536" + +weave_on $HOST1 launch-proxy + +assert_raises "proxy docker_on $HOST1 images -a" + +end_suite