From b39b3e627409c2ef2698b698fcfb25f84e732670 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Tue, 11 Jul 2017 20:52:33 +0100 Subject: [PATCH] re-add tests that were previously failing when using ebpf --- integration/330_process_edge_test.sh | 4 +-- .../331_process_edge_without_ebpf_test.sh | 23 ++++++++++++++ .../340_process_edge_across_host_2_test.sh | 6 ++-- ...ss_edge_across_host_without_ebpf_2_test.sh | 31 +++++++++++++++++++ 4 files changed, 59 insertions(+), 5 deletions(-) create mode 100755 integration/331_process_edge_without_ebpf_test.sh create mode 100755 integration/341_process_edge_across_host_without_ebpf_2_test.sh diff --git a/integration/330_process_edge_test.sh b/integration/330_process_edge_test.sh index e3f3ef803..7fadbe94a 100755 --- a/integration/330_process_edge_test.sh +++ b/integration/330_process_edge_test.sh @@ -3,10 +3,10 @@ # shellcheck disable=SC1091 . ./config.sh -start_suite "Test long connections (procspy) between processes" +start_suite "Test long connections between processes" weave_on "$HOST1" launch -scope_on "$HOST1" launch --probe.ebpf.connections=false --probe.conntrack=false +scope_on "$HOST1" launch server_on "$HOST1" weave_proxy_on "$HOST1" run -dti --name client alpine /bin/sh -c "while true; do \ diff --git a/integration/331_process_edge_without_ebpf_test.sh b/integration/331_process_edge_without_ebpf_test.sh new file mode 100755 index 000000000..712820d4b --- /dev/null +++ b/integration/331_process_edge_without_ebpf_test.sh @@ -0,0 +1,23 @@ +#! /bin/bash + +# shellcheck disable=SC1091 +. ./config.sh + +start_suite "Test long connections (procspy) between processes" + +weave_on "$HOST1" launch +scope_on "$HOST1" launch --probe.ebpf.connections=false + +server_on "$HOST1" +weave_proxy_on "$HOST1" run -dti --name client alpine /bin/sh -c "while true; do \ + nc nginx.weave.local 80 || true; \ + sleep 1; \ +done" + +wait_for processes "$HOST1" 60 "nginx: worker process" nc + +has processes "$HOST1" "nginx: worker process" +has processes "$HOST1" nc +has_connection processes "$HOST1" nc "nginx: worker process" + +scope_end_suite diff --git a/integration/340_process_edge_across_host_2_test.sh b/integration/340_process_edge_across_host_2_test.sh index 161c24929..50d8e1006 100755 --- a/integration/340_process_edge_across_host_2_test.sh +++ b/integration/340_process_edge_across_host_2_test.sh @@ -3,13 +3,13 @@ # shellcheck disable=SC1091 . ./config.sh -start_suite "Test long connections (procspy) between processes on different hosts" +start_suite "Test long connections between processes on different hosts" weave_on "$HOST1" launch "$HOST1" "$HOST2" weave_on "$HOST2" launch "$HOST1" "$HOST2" -scope_on "$HOST1" launch --probe.ebpf.connections=false --probe.conntrack=false -scope_on "$HOST2" launch --probe.ebpf.connections=false --probe.conntrack=false +scope_on "$HOST1" launch +scope_on "$HOST2" launch server_on "$HOST1" weave_proxy_on "$HOST2" run -dti --name client alpine /bin/sh -c "while true; do \ diff --git a/integration/341_process_edge_across_host_without_ebpf_2_test.sh b/integration/341_process_edge_across_host_without_ebpf_2_test.sh new file mode 100755 index 000000000..5dd41c507 --- /dev/null +++ b/integration/341_process_edge_across_host_without_ebpf_2_test.sh @@ -0,0 +1,31 @@ +#! /bin/bash + +# shellcheck disable=SC1091 +. ./config.sh + +start_suite "Test long connections (procspy) between processes on different hosts" + +weave_on "$HOST1" launch "$HOST1" "$HOST2" +weave_on "$HOST2" launch "$HOST1" "$HOST2" + +scope_on "$HOST1" launch --probe.ebpf.connections=false +scope_on "$HOST2" launch --probe.ebpf.connections=false + +server_on "$HOST1" +weave_proxy_on "$HOST2" run -dti --name client alpine /bin/sh -c "while true; do \ + nc nginx.weave.local 80 || true; \ + sleep 1; \ +done" + +sleep 30 # need to allow the scopes to poll dns, resolve the other app ids, and send them reports + +check() { + has processes "$1" "nginx: worker process" + has processes "$1" nc + has_connection processes "$1" nc "nginx: worker process" +} + +check "$HOST1" +check "$HOST2" + +scope_end_suite