From 3bc2d87312fe80a3567ea6828886d20c93b3f291 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Thu, 18 May 2017 19:57:44 +0000 Subject: [PATCH] Add integration test --- ...ntainer_to_container_edge_no_weave_test.sh | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 integration/350_container_to_container_edge_no_weave_test.sh diff --git a/integration/350_container_to_container_edge_no_weave_test.sh b/integration/350_container_to_container_edge_no_weave_test.sh new file mode 100755 index 0000000000..930a2d7085 --- /dev/null +++ b/integration/350_container_to_container_edge_no_weave_test.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +# shellcheck disable=SC1091 +. ./config.sh + +set -x + +start_suite "Test short lived connections between containers without Weave (no NAT)" + +scope_on "$HOST1" launch +docker_on "$HOST1" run -d --name nginx nginx +wait_for_containers "$HOST1" 60 nginx +nginx_ip="$(docker_on "$HOST1" inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nginx)" +docker_on "$HOST1" run -d --name client alpine /bin/sh -c "while true; do \ + wget $nginx_ip:80/ -O - >/dev/null || true; \ + sleep 1; \ +done" +wait_for_containers "$HOST1" 60 client + +has_container "$HOST1" nginx +has_container "$HOST1" client +has_connection containers "$HOST1" client nginx + +scope_end_suite