mirror of
https://github.com/ceph/ceph
synced 2024-12-24 12:24:19 +00:00
ca97fae81f
Test that it works in snaptest-0.sh, and set the flag in all the snap workunits so they continue to function. Signed-off-by: Greg Farnum <greg@inktank.com> Reviewed-by: Loic Dachary <loic@dachary.org>
29 lines
440 B
Bash
Executable File
29 lines
440 B
Bash
Executable File
#!/bin/sh -x
|
|
|
|
expect_failure() {
|
|
if [ `"$@"` -e 0 ]; then
|
|
return 1
|
|
fi
|
|
return 0
|
|
}
|
|
set -e
|
|
|
|
expect_failure mkdir .snap/foo
|
|
ceph mds set allow_new_snaps --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 mds unset allow_new_snaps --yes-i-really-mean-it
|
|
expect_failure mkdir .snap/baz
|
|
|
|
echo OK |