-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 313_container_to_container_edge_with_ebpf_proc_fallback_test.sh
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
integration/313_container_to_container_edge_with_ebpf_proc_fallback_test.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#! /bin/bash | ||
|
||
# shellcheck disable=SC1091 | ||
. ./config.sh | ||
|
||
start_suite "Test short lived connections between containers, with ebpf proc fallback" | ||
|
||
weave_on "$HOST1" launch | ||
# Manually start scope in order to set | ||
# `WEAVESCOPE_DOCKER_ARGS="-v /tmp:/sys/kernel/debug/tracing:ro"` | ||
# to make ebpf fail and test the proc fallback. | ||
DOCKER_HOST=tcp://${HOST1}:${DOCKER_PORT} CHECKPOINT_DISABLE=true \ | ||
WEAVESCOPE_DOCKER_ARGS="-v /tmp:/sys/kernel/debug/tracing:ro" \ | ||
"${SCOPE}" launch --probe.ebpf.connections=true | ||
weave_on "$HOST1" run -d --name nginx nginx | ||
weave_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" | ||
|
||
wait_for_containers "$HOST1" 60 nginx client | ||
|
||
has_container "$HOST1" nginx | ||
has_container "$HOST1" client | ||
has_connection containers "$HOST1" client nginx | ||
|
||
# Save stdout for debugging output | ||
exec 3>&1 | ||
assert_raises "docker_on $HOST1 logs weavescope 2>&1 | grep 'Fallback to proc scanning' || (docker_on $HOST1 logs weavescope 2>&3 ; false)" | ||
|
||
scope_end_suite |