File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,42 @@ function setup() {
4040
4141}
4242
43+ @test " RO mount/umount/remount/umount of good image works" {
44+ run atomfs-cover --debug mount ${BATS_SUITE_TMPDIR} /oci:test-squashfs $MP
45+ assert_success
46+ assert_file_exists $MP /1.README.md
47+ assert_file_exists $MP /random.txt
48+ assert_dir_exists $ATOMFS_TEST_RUN_DIR /meta/$MY_MNTNSNAME /
49+
50+ run atomfs-cover --debug umount $MP
51+ assert_success
52+
53+ # mount point and meta dir should exist but be empty:
54+ assert_dir_exists $MP
55+ assert [ -z $( ls -A $MP ) ]
56+ assert_dir_exists $ATOMFS_TEST_RUN_DIR /meta/$MY_MNTNSNAME /
57+ assert [ -z $( ls -A $ATOMFS_TEST_RUN_DIR /meta/$MY_MNTNSNAME / ) ]
58+
59+ # rinse, repeat:
60+
61+ run atomfs-cover --debug mount ${BATS_SUITE_TMPDIR} /oci:test-squashfs $MP
62+ assert_success
63+ assert_file_exists $MP /1.README.md
64+ assert_file_exists $MP /random.txt
65+ assert_dir_exists $ATOMFS_TEST_RUN_DIR /meta/$MY_MNTNSNAME /
66+
67+ run atomfs-cover --debug umount $MP
68+ assert_success
69+
70+ # mount point and meta dir should exist but be empty:
71+ assert_dir_exists $MP
72+ assert [ -z $( ls -A $MP ) ]
73+ assert_dir_exists $ATOMFS_TEST_RUN_DIR /meta/$MY_MNTNSNAME /
74+ assert [ -z $( ls -A $ATOMFS_TEST_RUN_DIR /meta/$MY_MNTNSNAME / ) ]
75+
76+ }
77+
78+
4379@test " mount with missing verity data fails" {
4480 run atomfs-cover --debug mount ${BATS_SUITE_TMPDIR} /oci-no-verity:test-squashfs $MP
4581 assert_failure
You can’t perform that action at this time.
0 commit comments