summaryrefslogtreecommitdiff
path: root/tests/pull-test.sh
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2017-06-12 15:06:19 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2017-06-13 18:44:28 +0000
commit6ed824bf00cda6943bdc221194d65de9382d79d8 (patch)
tree930724e0af8d873485e334f3b535a799ff89827f /tests/pull-test.sh
parent74e3581ed674746d03e8a0e0af332b10de26963f (diff)
downloadostree-6ed824bf00cda6943bdc221194d65de9382d79d8.tar.gz
lib/pull: Add OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES
This is an option which is intended mostly for flatpak; see: https://github.com/flatpak/flatpak/issues/845 We're adding an option for pulling into *all* repo modes that has an effect similar to the `bare-user-only` change from https://github.com/ostreedev/ostree/pull/909 This way one can pull content into e.g. a root-owned `bare` repository and ensure that there aren't any setuid or world-writable files. Closes: #926 Approved by: alexlarsson
Diffstat (limited to 'tests/pull-test.sh')
-rw-r--r--tests/pull-test.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/pull-test.sh b/tests/pull-test.sh
index 4a4ef069..f1ebca4c 100644
--- a/tests/pull-test.sh
+++ b/tests/pull-test.sh
@@ -35,7 +35,7 @@ function verify_initial_contents() {
assert_file_has_content baz/cow '^moo$'
}
-echo "1..20"
+echo "1..21"
# Try both syntaxes
repo_init --no-gpg-verify
@@ -79,6 +79,13 @@ ${CMD_PREFIX} ostree --repo=mirrorrepo pull origin main
${CMD_PREFIX} ostree --repo=mirrorrepo fsck
echo "ok pull (refuses deltas)"
+if ${CMD_PREFIX} ostree --repo=mirrorrepo \
+ pull origin main --bareuseronly-files 2>err.txt; then
+ assert_not_reached "--bareuseronly-files unexpectedly succeeded"
+fi
+assert_file_has_content err.txt 'bareuseronly-files with non-local'
+echo "ok pull (refuses bareuseronly)"
+
cd ${test_tmpdir}
rm mirrorrepo/refs/remotes/* -rf
${CMD_PREFIX} ostree --repo=mirrorrepo prune --refs-only