Remove plugin-connected containers before end of test, to avoid delaying later cleanup.
Also use a shorter sequence to exclude the plugin when removing other containers.
This commit is contained in:
1 parent
a5739e8753
commit
0e655a2bbd
4 files changed
+8
-3
No files matched your search
@@ -30,4 +30,6 @@ proxy docker_on $HOST1 start c2
|
||||
|
||||
assert "show_multicast_route_on $HOST1 c2" "224.0.0.0/4 dev ethwe "
|
||||
|
||||
docker_on $HOST1 rm -f c3
|
||||
|
||||
end_suite
|
||||
@@ -18,4 +18,7 @@ start_container_local_plugin $HOST2 --name=c2 --hostname=$C2_NAME --dns=$DNS_IP
|
||||
assert_raises "exec_on $HOST1 c1 $PING $C2_NAME"
|
||||
assert_raises "exec_on $HOST2 c2 $PING $C1_NAME"
|
||||
|
||||
docker_on $HOST1 rm -f c1
|
||||
docker_on $HOST2 rm -f c2
|
||||
|
||||
end_suite
|
||||
@@ -21,4 +21,6 @@ assert "weave_on $HOST1 dns-lookup $C1_NAME" "$c1ip"
|
||||
start_container $HOST1 --name=c2
|
||||
assert_raises "container_ip $HOST1 c2 | grep -v $c1ip"
|
||||
|
||||
docker_on $HOST1 rm -f c1 c2
|
||||
|
||||
end_suite
|
||||
+1
-3
@@ -226,9 +226,7 @@ assert_dns_ptr_record() {
|
||||
start_suite() {
|
||||
for host in $HOSTS; do
|
||||
[ -z "$DEBUG" ] || echo "Cleaning up on $host: removing all containers and resetting weave"
|
||||
PLUGIN_ID=$(docker_on $host ps -aq --filter=name=weaveplugin)
|
||||
PLUGIN_FILTER="cat"
|
||||
[ -n "$PLUGIN_ID" ] && PLUGIN_FILTER="grep -v $PLUGIN_ID"
|
||||
PLUGIN_FILTER=$(docker_on $host inspect -f 'grep -v {{.Id}}' weaveplugin 2>/dev/null) || PLUGIN_FILTER=cat
|
||||
rm_containers $host $(docker_on $host ps -aq 2>/dev/null | $PLUGIN_FILTER)
|
||||
weave_on $host reset 2>/dev/null
|
||||
done
|
||||
|
||||
Reference in new issue
Block a user