ceph/qa/workunits/snaps/snaptest-0.sh
Greg Farnum ca97fae81f qa: update snaps workunits for allow_new_snaps flag
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>
2013-09-26 18:27:52 +02:00

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