mirror of
https://github.com/ceph/ceph
synced 2024-12-26 13:33:57 +00:00
ce0e3bd188
These were probably just obscuring other failures. Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: John Spray <john.spray@inktank.com>
30 lines
427 B
Bash
Executable File
30 lines
427 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 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 mds set allow_new_snaps false
|
|
expect_failure mkdir .snap/baz
|
|
|
|
echo OK
|