-
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 integration test for procspy edges.
- Loading branch information
Showing
7 changed files
with
113 additions
and
40 deletions.
There are no files selected for viewing
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
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
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
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
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,21 @@ | ||
#! /bin/bash | ||
|
||
. ./config.sh | ||
|
||
start_suite "Test short connections between processes" | ||
|
||
WEAVE_DOCKER_ARGS=$ADD_HOST_ARGS weave_on $HOST1 launch | ||
scope_on $HOST1 launch | ||
weave_on $HOST1 run -d --name nginx nginx | ||
weave_on $HOST1 run -dti --name client alpine /bin/sh -c "while true; do \ | ||
nc nginx.weave.local 80 || true; \ | ||
sleep 1; \ | ||
done" | ||
|
||
wait_for application $HOST1 60 nginx client | ||
|
||
has applications $HOST1 nginx | ||
has applications $HOST1 nc | ||
has_connection applications $HOST1 nc nginx | ||
|
||
scope_end_suite |
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,30 @@ | ||
#! /bin/bash | ||
|
||
. ./config.sh | ||
|
||
start_suite "Test connections between processes on different hosts" | ||
|
||
WEAVE_DOCKER_ARGS=$ADD_HOST_ARGS weave_on $HOST1 launch $HOST1 $HOST2 | ||
WEAVE_DOCKER_ARGS=$ADD_HOST_ARGS 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 -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 applications $1 nginx | ||
has applications $1 nc | ||
has_connection applications $1 nc nginx | ||
} | ||
|
||
check $HOST1 | ||
check $HOST2 | ||
|
||
scope_end_suite |
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