Signed-off-by: Andrew Schoen <aschoen@redhat.com>
sudo systemctl restart docker
newgrp docker
+# Sometimes, networks may linger around, so we must ensure they are killed:
+networks=`sudo virsh net-list --all | grep active | egrep -v "(default|libvirt)" | cut -d ' ' -f 2`
+for network in $networks; do
+ sudo virsh net-destroy $network || true
+ sudo virsh net-undefine $network || true
+done
+
# adding groups on the fly doesn't guarantee their availability
# so we must use `sg` to execute the tests as part of the docker group to avoid
# 'Permission Denied` when tryin to talk over the socket