Run integration tests in parallel when possible.
This commit is contained in:
1 parent
4da999ba86
commit
669a0db528
12 files changed
+260
-31
No files matched your search
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#! /bin/bash
|
||||
|
||||
. ./config.sh
|
||||
|
||||
C1=10.2.1.41
|
||||
C3=10.2.1.71
|
||||
|
||||
launch_all() {
|
||||
weave_on $HOST1 launch-router $1
|
||||
weave_on $HOST2 launch-router $1 --ipalloc-range="" $HOST1
|
||||
weave_on $HOST3 launch-router $1 $HOST2
|
||||
}
|
||||
|
||||
start_suite "Peer discovery, multi-hop routing and gossip forwarding"
|
||||
|
||||
launch_all
|
||||
|
||||
start_container $HOST1 $C1/24 --name=c1
|
||||
start_container $HOST3 $C3/24 --name=c3
|
||||
|
||||
assert_raises "exec_on $HOST1 c1 $PING $C3"
|
||||
stop_router_on $HOST2
|
||||
assert_raises "exec_on $HOST1 c1 $PING $C3"
|
||||
|
||||
stop_router_on $HOST1
|
||||
stop_router_on $HOST3
|
||||
|
||||
launch_all --no-discovery
|
||||
|
||||
sleep 5 # give topology gossip some time to propagate
|
||||
|
||||
assert_raises "exec_on $HOST1 c1 $PING $C3"
|
||||
|
||||
# this stalls if gossip forwarding doesn't work. We wait for slightly
|
||||
# longer than the gossip interval (30s) before giving up.
|
||||
assert_raises "timeout 40 cat <( start_container $HOST3 )"
|
||||
|
||||
stop_router_on $HOST2
|
||||
assert_raises "exec_on $HOST1 c1 sh -c '! $PING $C3'"
|
||||
|
||||
end_suite
|
||||
Reference in new issue
Block a user