diff options
author | Matthew Leeds <matthew.leeds@endlessm.com> | 2017-12-05 12:57:46 -0800 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-12-08 19:40:19 +0000 |
commit | 102f30f6cc601aeafd92481ff788bdd35e3f052d (patch) | |
tree | e8724e70e13df83364916b1f23cac10533baa4c7 /tests/test-remote-add.sh | |
parent | 9917887a3f6b1a9a6e9741a992c009352c0504ac (diff) | |
download | ostree-102f30f6cc601aeafd92481ff788bdd35e3f052d.tar.gz |
lib/repo: Properly list remotes of parent repos
This commit fixes an infinite loop that happens if you try to list the
remotes of a repo that has a parent repo set. It also adds a unit test
to ensure the right behavior, which is that both the child remotes and
parent remotes are listed.
Closes: #1366
Approved by: cgwalters
Diffstat (limited to 'tests/test-remote-add.sh')
-rwxr-xr-x | tests/test-remote-add.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/test-remote-add.sh b/tests/test-remote-add.sh index badf1495..01864b6a 100755 --- a/tests/test-remote-add.sh +++ b/tests/test-remote-add.sh @@ -21,7 +21,7 @@ set -euo pipefail . $(dirname $0)/libtest.sh -echo '1..13' +echo '1..14' setup_test_repository "bare" $OSTREE remote add origin http://example.com/ostree/gnome @@ -63,6 +63,18 @@ assert_file_has_content list.txt "http://another.com/repo" assert_file_has_content list.txt "http://another-noexist.example.com/anotherrepo" echo "ok remote list with urls" +cd ${test_tmpdir} +rm -rf parent-repo +ostree_repo_init parent-repo +$OSTREE config set core.parent ${test_tmpdir}/parent-repo +${CMD_PREFIX} ostree --repo=parent-repo remote add --no-gpg-verify parent-remote http://parent-remote.example.com/parent-remote +$OSTREE remote list > list.txt +assert_file_has_content list.txt "origin" +assert_file_has_content list.txt "another" +assert_file_has_content list.txt "another-noexist" +assert_file_has_content list.txt "parent-remote" +echo "ok remote list with parent repo remotes" + $OSTREE remote delete another echo "ok remote delete" |