From 945746836232af9cd556061b3462e6b9ef280301 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sun, 30 Jul 2017 10:33:29 +0100 Subject: [PATCH] remove checks for ebpf'ness in integration tests since probes no longer supply that info --- .../301_internet_edge_without_ebpf_test.sh | 2 -- .../310_container_to_container_edge_test.sh | 1 - ...ainer_to_container_edge_same_netns_test.sh | 2 -- ..._container_accept_before_kretprobe_test.sh | 2 -- integration/config.sh | 26 ------------------- 5 files changed, 33 deletions(-) diff --git a/integration/301_internet_edge_without_ebpf_test.sh b/integration/301_internet_edge_without_ebpf_test.sh index fa36ff0c3..c7c515483 100755 --- a/integration/301_internet_edge_without_ebpf_test.sh +++ b/integration/301_internet_edge_without_ebpf_test.sh @@ -25,8 +25,6 @@ scope_on "$HOST1" launch --probe.ebpf.connections=false # # has_connection_by_id containers "$HOST1" "in-theinternet" "$(node_id containers "$HOST1" nginx)" # -# endpoints_have_ebpf "$HOST1" -# # kill %do_connections scope_end_suite diff --git a/integration/310_container_to_container_edge_test.sh b/integration/310_container_to_container_edge_test.sh index dbf9a4dd9..e39579e1d 100755 --- a/integration/310_container_to_container_edge_test.sh +++ b/integration/310_container_to_container_edge_test.sh @@ -20,6 +20,5 @@ list_containers "$HOST1" list_connections "$HOST1" has_connection containers "$HOST1" client nginx -endpoints_have_ebpf "$HOST1" scope_end_suite diff --git a/integration/312_container_to_container_edge_same_netns_test.sh b/integration/312_container_to_container_edge_same_netns_test.sh index 5cb731f6a..c11785e03 100755 --- a/integration/312_container_to_container_edge_same_netns_test.sh +++ b/integration/312_container_to_container_edge_same_netns_test.sh @@ -19,6 +19,4 @@ list_connections "$HOST1" has_connection containers "$HOST1" client nginx -endpoints_have_ebpf "$HOST1" - scope_end_suite diff --git a/integration/314_container_accept_before_kretprobe_test.sh b/integration/314_container_accept_before_kretprobe_test.sh index cc04d0b46..e6f235dc7 100755 --- a/integration/314_container_accept_before_kretprobe_test.sh +++ b/integration/314_container_accept_before_kretprobe_test.sh @@ -34,6 +34,4 @@ list_connections "$HOST1" has_connection containers "$HOST1" client server -endpoints_have_ebpf "$HOST1" - scope_end_suite diff --git a/integration/config.sh b/integration/config.sh index 2c51df5a2..3fb8c4ccb 100644 --- a/integration/config.sh +++ b/integration/config.sh @@ -122,32 +122,6 @@ has_connection_by_id() { assert "curl -s http://$host:4040/api/topology/${view}?system=show | jq -r '.nodes[\"$from_id\"].adjacency | contains([\"$to_id\"])'" true } -# this checks if ebpf is true on all endpoints on a given host -endpoints_have_ebpf() { - local host="$1" - local timeout="${2:-60}" - local number_of_endpoints=-1 - local have_ebpf=-1 - local report - - for i in $(seq "$timeout"); do - report=$(curl -s "http://${host}:4040/api/report") - number_of_endpoints=$(echo "${report}" | jq -r '.Endpoint.nodes | length') - have_ebpf=$(echo "${report}" | jq -r '.Endpoint.nodes[].latest.eBPF | select(.value != null) | contains({"value": "true"})' | wc -l) - if [[ "$number_of_endpoints" -gt 0 && "$have_ebpf" -gt 0 && "$number_of_endpoints" -eq "$have_ebpf" ]]; then - echo "Found ${number_of_endpoints} endpoints with ebpf enabled" - assert "echo '$have_ebpf'" "$number_of_endpoints" - return - fi - sleep 1 - done - - echo "Only ${have_ebpf} endpoints of ${number_of_endpoints} have ebpf enabled, should be equal" - echo "Example of one endpoint:" - echo "${report}" | jq -r '[.Endpoint.nodes[]][0]' - assert "echo '$have_ebpf" "$number_of_endpoints" -} - has_connection() { local view="$1" local host="$2"