remove checks for ebpf'ness in integration tests

since probes no longer supply that info
This commit is contained in:
Matthias Radestock
2017-07-30 10:33:29 +01:00
parent e77d40fc16
commit 9457468362
5 changed files with 0 additions and 33 deletions

View File

@@ -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

View File

@@ -20,6 +20,5 @@ list_containers "$HOST1"
list_connections "$HOST1"
has_connection containers "$HOST1" client nginx
endpoints_have_ebpf "$HOST1"
scope_end_suite

View File

@@ -19,6 +19,4 @@ list_connections "$HOST1"
has_connection containers "$HOST1" client nginx
endpoints_have_ebpf "$HOST1"
scope_end_suite

View File

@@ -34,6 +34,4 @@ list_connections "$HOST1"
has_connection containers "$HOST1" client server
endpoints_have_ebpf "$HOST1"
scope_end_suite

View File

@@ -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"