diff options
author | Colin Walters <walters@verbum.org> | 2017-12-14 13:13:42 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-12-14 22:22:39 +0000 |
commit | b822f337b541e3cc8be3454f0e423e0874209b82 (patch) | |
tree | 533b98b511608160ba193e5a2e52541bd3f4d894 /tests/test-refs.sh | |
parent | 85f388e05883d4a0e55d3dfcc5b8763c20dfba51 (diff) | |
download | ostree-b822f337b541e3cc8be3454f0e423e0874209b82.tar.gz |
bin/refs: Disallow aliases to remote refs
It can't really work in general; the client and server would
have to agree on the name of the remote.
Closes: https://github.com/ostreedev/ostree/issues/1342
Closes: #1381
Approved by: jlebon
Diffstat (limited to 'tests/test-refs.sh')
-rwxr-xr-x | tests/test-refs.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test-refs.sh b/tests/test-refs.sh index 1f0dbdbd..316e3e10 100755 --- a/tests/test-refs.sh +++ b/tests/test-refs.sh @@ -23,7 +23,7 @@ set -euo pipefail setup_fake_remote_repo1 "archive" -echo '1..5' +echo '1..6' cd ${test_tmpdir} mkdir repo @@ -186,3 +186,10 @@ assert_file_has_content_literal refs.txt 'exampleos/x86_64/stable/server -> exam ${CMD_PREFIX} ostree --repo=repo summary -u echo "ok ref symlink" + +# https://github.com/ostreedev/ostree/issues/1342 +if ${CMD_PREFIX} ostree --repo=repo refs -A exampleos/x86_64/27/server --create=exampleos:exampleos/x86_64/stable/server 2>err.txt; then + fatal "Created alias ref to remote?" +fi +assert_file_has_content_literal err.txt 'Cannot create alias to remote ref' +echo "ok ref no alias remote" |