diff --git a/integration/310_container_to_container_edge_test.sh b/integration/310_container_to_container_edge_test.sh index e40d86f4c..307d4e516 100755 --- a/integration/310_container_to_container_edge_test.sh +++ b/integration/310_container_to_container_edge_test.sh @@ -7,8 +7,8 @@ start_suite "Test short lived connections between containers" weave_on "$HOST1" launch scope_on "$HOST1" launch -weave_on "$HOST1" run -d --name nginx nginx -weave_on "$HOST1" run -d --name client alpine /bin/sh -c "while true; do \ +weave_proxy_on "$HOST1" run -d --name nginx nginx +weave_proxy_on "$HOST1" run -d --name client alpine /bin/sh -c "while true; do \ wget http://nginx.weave.local:80/ -O - >/dev/null || true; \ sleep 1; \ done" diff --git a/integration/311_container_to_container_edge_without_ebpf_test.sh b/integration/311_container_to_container_edge_without_ebpf_test.sh index c3190ad5a..84b95f725 100755 --- a/integration/311_container_to_container_edge_without_ebpf_test.sh +++ b/integration/311_container_to_container_edge_without_ebpf_test.sh @@ -7,8 +7,8 @@ start_suite "Test short lived connections between containers, without ebpf conne weave_on "$HOST1" launch scope_on "$HOST1" launch --probe.ebpf.connections=false -weave_on "$HOST1" run -d --name nginx nginx -weave_on "$HOST1" run -d --name client alpine /bin/sh -c "while true; do \ +weave_proxy_on "$HOST1" run -d --name nginx nginx +weave_proxy_on "$HOST1" run -d --name client alpine /bin/sh -c "while true; do \ wget http://nginx.weave.local:80/ -O - >/dev/null || true; \ sleep 1; \ done" diff --git a/integration/313_container_to_container_edge_with_ebpf_proc_fallback_test.sh b/integration/313_container_to_container_edge_with_ebpf_proc_fallback_test.sh index 7aee7d2d3..44e9e6b12 100755 --- a/integration/313_container_to_container_edge_with_ebpf_proc_fallback_test.sh +++ b/integration/313_container_to_container_edge_with_ebpf_proc_fallback_test.sh @@ -12,8 +12,8 @@ weave_on "$HOST1" launch DOCKER_HOST=tcp://${HOST1}:${DOCKER_PORT} CHECKPOINT_DISABLE=true \ WEAVESCOPE_DOCKER_ARGS="-v /tmp:/sys/kernel/debug/tracing:ro" \ "${SCOPE}" launch -weave_on "$HOST1" run -d --name nginx nginx -weave_on "$HOST1" run -d --name client alpine /bin/sh -c "while true; do \ +weave_proxy_on "$HOST1" run -d --name nginx nginx +weave_proxy_on "$HOST1" run -d --name client alpine /bin/sh -c "while true; do \ wget http://nginx.weave.local:80/ -O - >/dev/null || true; \ sleep 1; \ done" diff --git a/integration/314_container_accept_before_kretprobe_test.sh b/integration/314_container_accept_before_kretprobe_test.sh index a34582ca5..cc04d0b46 100755 --- a/integration/314_container_accept_before_kretprobe_test.sh +++ b/integration/314_container_accept_before_kretprobe_test.sh @@ -10,7 +10,7 @@ weave_on "$HOST1" launch # Launch the server before Scope to make sure it calls accept() before Scope's # kretprobe on the accept function is installed. We use busybox' nc instead of # Alpine's nc so that it blocks on the accept() syscall. -weave_on "$HOST1" run -d --name server busybox /bin/sh -c "while true; do \ +weave_proxy_on "$HOST1" run -d --name server busybox /bin/sh -c "while true; do \ date ; sleep 1 ; done | nc -l -p 8080" @@ -19,7 +19,7 @@ scope_on "$HOST1" launch wait_for_containers "$HOST1" 60 server has_container "$HOST1" server -weave_on "$HOST1" run -d --name client busybox /bin/sh -c "ping -c 5 server.weave.local; \ +weave_proxy_on "$HOST1" run -d --name client busybox /bin/sh -c "ping -c 5 server.weave.local; \ while true; do \ date ; sleep 1 ; diff --git a/integration/320_container_edge_cross_host_2_test.sh b/integration/320_container_edge_cross_host_2_test.sh index 5a0d3b19c..7e63b95e0 100755 --- a/integration/320_container_edge_cross_host_2_test.sh +++ b/integration/320_container_edge_cross_host_2_test.sh @@ -11,8 +11,8 @@ weave_on "$HOST2" launch "$HOST1" "$HOST2" scope_on "$HOST1" launch scope_on "$HOST2" launch -weave_on "$HOST1" run -d --name nginx nginx -weave_on "$HOST2" run -d --name client alpine /bin/sh -c "while true; do \ +weave_proxy_on "$HOST1" run -d --name nginx nginx +weave_proxy_on "$HOST2" run -d --name client alpine /bin/sh -c "while true; do \ wget http://nginx.weave.local:80/ -O - >/dev/null || true; \ sleep 1; \ done" diff --git a/integration/330_process_edge_test.sh b/integration/330_process_edge_test.sh index e986d13ce..414e56493 100755 --- a/integration/330_process_edge_test.sh +++ b/integration/330_process_edge_test.sh @@ -7,8 +7,8 @@ start_suite "Test long connections (procspy) between processes" weave_on "$HOST1" launch scope_on "$HOST1" launch --probe.conntrack=false -weave_on "$HOST1" run -d --name nginx nginx -weave_on "$HOST1" run -dti --name client alpine /bin/sh -c "while true; do \ +weave_proxy_on "$HOST1" run -d --name nginx nginx +weave_proxy_on "$HOST1" run -dti --name client alpine /bin/sh -c "while true; do \ nc nginx.weave.local 80 || true; \ sleep 1; \ done" diff --git a/integration/340_process_edge_across_host_2_test.sh b/integration/340_process_edge_across_host_2_test.sh index 9947e7fbf..0ead397f8 100755 --- a/integration/340_process_edge_across_host_2_test.sh +++ b/integration/340_process_edge_across_host_2_test.sh @@ -11,8 +11,8 @@ weave_on "$HOST2" launch "$HOST1" "$HOST2" scope_on "$HOST1" launch --probe.conntrack=false scope_on "$HOST2" launch --probe.conntrack=false -weave_on "$HOST1" run -d --name nginx nginx -weave_on "$HOST2" run -dti --name client alpine /bin/sh -c "while true; do \ +weave_proxy_on "$HOST1" run -d --name nginx nginx +weave_proxy_on "$HOST2" run -dti --name client alpine /bin/sh -c "while true; do \ nc nginx.weave.local 80 || true; \ sleep 1; \ done" diff --git a/integration/410_container_control_test.sh b/integration/410_container_control_test.sh index 02f731f14..5c2f50289 100755 --- a/integration/410_container_control_test.sh +++ b/integration/410_container_control_test.sh @@ -8,7 +8,7 @@ start_suite "Test container controls" weave_on "$HOST1" launch scope_on "$HOST1" launch -CID=$(weave_on "$HOST1" run -dti --name alpine alpine /bin/sh) +CID=$(weave_proxy_on "$HOST1" run -dti --name alpine alpine /bin/sh) wait_for_containers "$HOST1" 60 alpine diff --git a/integration/config.sh b/integration/config.sh index ac7d37c21..a69a26538 100644 --- a/integration/config.sh +++ b/integration/config.sh @@ -28,6 +28,13 @@ weave_on() { DOCKER_HOST=tcp://$host:$DOCKER_PORT CHECKPOINT_DISABLE=true "$WEAVE" "$@" } +weave_proxy_on() { + local host=$1 + shift 1 + [ -z "$DEBUG" ] || greyly echo "Weave proxy on $host: $*" >&2 + DOCKER_PORT=12375 docker_on "$host" "$@" +} + scope_end_suite() { end_suite for host in $HOSTS; do