-
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 short lived connections from the internet.
- Loading branch information
Tom Wilkie
committed
Oct 2, 2015
1 parent
d3aa975
commit b613f33
Showing
2 changed files
with
42 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#! /bin/bash | ||
|
||
. ./config.sh | ||
|
||
start_suite "Test short lived connections from the Internet" | ||
|
||
weave_on $HOST1 launch | ||
scope_on $HOST1 launch | ||
docker_on $HOST1 run -d -p 80:80 --name nginx nginx | ||
|
||
do_connections() { | ||
while true; do | ||
curl -s http://$HOST1:80/ >/dev/null | ||
sleep 1 | ||
done | ||
} | ||
do_connections& | ||
|
||
sleep 5 # give the probe a few seconds to build a report and send it to the app | ||
|
||
has_container $HOST1 nginx 1 | ||
has_connection $HOST1 "The Internet" nginx | ||
|
||
kill %do_connections | ||
|
||
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