summaryrefslogtreecommitdiff
path: root/tests/test-refs-collections.sh
diff options
context:
space:
mode:
authorMatthew Leeds <matthew.leeds@endlessm.com>2017-09-07 11:19:34 -0700
committerAtomic Bot <atomic-devel@projectatomic.io>2017-09-07 18:49:55 +0000
commit1e3f87c34c2f51385aef5aafcdf55e60d42bf426 (patch)
tree3f5acd050d3a2bba545d3e452a77f8ac8eec7dfc /tests/test-refs-collections.sh
parent3f476ac54705b31093e77f6dfb909effdec351af (diff)
downloadostree-1e3f87c34c2f51385aef5aafcdf55e60d42bf426.tar.gz
tests: Check "refs -c PREFIX" behavior
This commit adds tests to check the behavior of "refs -c PREFIX", where prefix is interpreted as a collection ID. Closes: #1149 Approved by: cgwalters
Diffstat (limited to 'tests/test-refs-collections.sh')
-rwxr-xr-xtests/test-refs-collections.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test-refs-collections.sh b/tests/test-refs-collections.sh
index f36fd7b9..5e6b50d7 100755
--- a/tests/test-refs-collections.sh
+++ b/tests/test-refs-collections.sh
@@ -112,9 +112,16 @@ mkdir -p adir
${CMD_PREFIX} ostree --repo=collection-repo commit --branch=rcommit -m rcommit -s rcommit adir
${CMD_PREFIX} ostree --repo=repo remote add --no-gpg-verify --collection-id org.example.RemoteCollection collection-repo-remote "file://${test_tmpdir}/collection-repo"
${CMD_PREFIX} ostree --repo=repo pull collection-repo-remote rcommit
+
${CMD_PREFIX} ostree --repo=repo refs --collections > refs
assert_file_has_content refs "^(org.example.RemoteCollection, rcommit)$"
+${CMD_PREFIX} ostree --repo=repo refs --collections org.example.RemoteCollection > refs
+assert_file_has_content refs "^(org.example.RemoteCollection, rcommit)$"
+
+${CMD_PREFIX} ostree --repo=repo refs --collections org.example.NonexistentID > refs
+assert_not_file_has_content refs "^(org.example.RemoteCollection, rcommit)$"
+
cd ${test_tmpdir}
mkdir no-collection-repo
ostree_repo_init no-collection-repo