summaryrefslogtreecommitdiff
path: root/test/librechroot-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/librechroot-test.sh')
-rw-r--r--test/librechroot-test.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/librechroot-test.sh b/test/librechroot-test.sh
index 667246c..51a43bd 100644
--- a/test/librechroot-test.sh
+++ b/test/librechroot-test.sh
@@ -127,3 +127,25 @@ it_fails_when_syncing_a_copy_with_itself() {
true;;
esac
}
+
+it_deletes_copies() {
+ require network sudo || return 0
+ libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
+ testsudo librechroot -l "$roundup_test_name" make
+ test -d "$chrootdir/default/$roundup_test_name"
+ testsudo librechroot -l "$roundup_test_name" delete
+ not test -e "$chrootdir/default/$roundup_test_name"
+}
+
+it_deletes_subvolumes_recursively() {
+ require network sudo btrfs || return 0
+ libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
+ testsudo librechroot -l "$roundup_test_name" make
+ testsudo librechroot -l "$roundup_test_name" install-name btrfs-progs
+ test -d "$chrootdir/default/$roundup_test_name"
+ not test -e "$chrootdir/default/$roundup_test_name/var/subvolume"
+ testsudo librechroot -l "$roundup_test_name" run btrfs subvolume create /var/subvolume
+ test -d "$chrootdir/default/$roundup_test_name/var/subvolume"
+ testsudo librechroot -l "$roundup_test_name" delete
+ not test -e "$chrootdir/default/$roundup_test_name"
+}