mirror of
https://github.com/ceph/ceph
synced 2024-12-22 03:22:00 +00:00
183646c919
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
28 lines
463 B
Bash
Executable File
28 lines
463 B
Bash
Executable File
#!/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
|