summaryrefslogtreecommitdiff
path: root/tests/test-pull-subpath.sh
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-04-07 17:03:08 +0200
committerColin Walters (automation) <walters+githubbot@verbum.org>2016-04-07 15:15:39 +0000
commit91734a8a18e714d68529ea0fecbc526dafe9977e (patch)
tree008299a0fe13f2c3300dbc1beeed8e544bfdd9e7 /tests/test-pull-subpath.sh
parent984bf91826187140682947fb8e0a2cc0a8a3f355 (diff)
downloadostree-91734a8a18e714d68529ea0fecbc526dafe9977e.tar.gz
Support pathnames for --subpath=...
This allows you to pull a single file, rather than just a directory. Closes: #244 Approved by: cgwalters
Diffstat (limited to 'tests/test-pull-subpath.sh')
-rwxr-xr-xtests/test-pull-subpath.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-pull-subpath.sh b/tests/test-pull-subpath.sh
index 8d20341e..b0bf4839 100755
--- a/tests/test-pull-subpath.sh
+++ b/tests/test-pull-subpath.sh
@@ -44,6 +44,10 @@ assert_file_has_content err.txt "Couldn't find file object"
rev=$(${CMD_PREFIX} ostree --repo=repo rev-parse origin:main)
assert_has_file repo/state/${rev}.commitpartial
+# Test pulling a file, not a dir
+${CMD_PREFIX} ostree --repo=repo pull --subpath=/firstfile origin main
+${CMD_PREFIX} ostree --repo=repo ls origin:main /firstfile
+
${CMD_PREFIX} ostree --repo=repo pull origin main
assert_not_has_file repo/state/${rev}.commitpartial
${CMD_PREFIX} ostree --repo=repo fsck