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:
Bryan Boreham committed 2016-04-26 15:42:35 +01:00
1 parent a5739e8753
commit 0e655a2bbd
4 files changed
+8 -3

No files matched your search

+1 -3
View File
@@ -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