diff --git a/tests/helpers.bash b/tests/helpers.bash index 1fb083e..78e74df 100644 --- a/tests/helpers.bash +++ b/tests/helpers.bash @@ -112,7 +112,14 @@ function trust_teardown { } function common_teardown { - echo "Not deleting $TMPD and $TMPUD" + echo "Deleting $TMPD and $TMPUD" + if [ -n $TMPD ]; then + lxc-usernsexec -s -- rm -rf $TMPD + fi + if [ -n $TMPUD ]; then + lxc-usernsexec -s -- rm -rf $TMPUD + fi + trust_teardown } diff --git a/tests/vmhelpers.bash b/tests/vmhelpers.bash index 4fbe99a..be8072f 100644 --- a/tests/vmhelpers.bash +++ b/tests/vmhelpers.bash @@ -9,7 +9,7 @@ function vm_setup() { } function vm_teardown() { - echo "not deleting machine ${VMNAME}" + machine delete ${VMNAME} } function wait_for_vm() {