[ostree] tests: Add a test case for unwritable repos
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] tests: Add a test case for unwritable repos
- Date: Wed, 25 Mar 2015 21:25:33 +0000 (UTC)
commit 6b16aba5f9de5f1599b1077bac1492db981c24fe
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Feb 3 21:44:38 2015 -0500
tests: Add a test case for unwritable repos
tests/basic-test.sh | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/tests/basic-test.sh b/tests/basic-test.sh
index da62c0d..2c0455e 100755
--- a/tests/basic-test.sh
+++ b/tests/basic-test.sh
@@ -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"
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]