tests: Add a test case for unwritable repos

This commit is contained in:
Matthew Barnes 2015-02-03 21:44:38 -05:00 committed by Colin Walters
parent 1d5e2682fd
commit 6b16aba5f9
1 changed files with 11 additions and 0 deletions

View File

@ -368,3 +368,14 @@ mkdir -p test2-checkout
cd test2-checkout
touch should-not-be-fsynced
$OSTREE commit -b test2 -s "Unfsynced commit" --fsync=false
cd ${test_tmpdir}
rm -f expected-fail error-message
$OSTREE init --mode=archive-z2 --repo=repo-noperm
chmod -w repo-noperm
$OSTREE --repo=repo-noperm pull-local repo 2> error-message || touch expected-fail
assert_has_file expected-fail
assert_file_has_content error-message "Permission denied"
chmod +w repo-noperm
echo "ok unwritable repo was caught"