diff options
Diffstat (limited to 'qa/workunits/fs/snaps/snaptest-0.sh')
-rwxr-xr-x | qa/workunits/fs/snaps/snaptest-0.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/qa/workunits/fs/snaps/snaptest-0.sh b/qa/workunits/fs/snaps/snaptest-0.sh new file mode 100755 index 00000000..791caf9e --- /dev/null +++ b/qa/workunits/fs/snaps/snaptest-0.sh @@ -0,0 +1,27 @@ +#!/bin/sh -x + +expect_failure() { + if "$@"; then return 1; else return 0; fi +} +set -e + +ceph fs set cephfs allow_new_snaps false +expect_failure mkdir .snap/foo +ceph fs set cephfs allow_new_snaps true --yes-i-really-mean-it + +echo asdf > foo +mkdir .snap/foo +grep asdf .snap/foo/foo +rmdir .snap/foo + +echo asdf > bar +mkdir .snap/bar +rm bar +grep asdf .snap/bar/bar +rmdir .snap/bar +rm foo + +ceph fs set cephfs allow_new_snaps false +expect_failure mkdir .snap/baz + +echo OK |