summaryrefslogtreecommitdiff
path: root/tests/test-remote-add.sh
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2014-12-16 10:41:34 -0500
committerMatthew Barnes <mbarnes@redhat.com>2014-12-17 16:05:53 -0500
commite54d48be39b29904139ef01e2fa218bafbe60bca (patch)
tree6feb7acbb542d8ce87e1756929d2bcbe2cc8aed0 /tests/test-remote-add.sh
parent39be27fc93926c8ecede26d10385673100b8540f (diff)
downloadostree-e54d48be39b29904139ef01e2fa218bafbe60bca.tar.gz
Add "ostree remote list" command
Lists available remote names.
Diffstat (limited to 'tests/test-remote-add.sh')
-rwxr-xr-xtests/test-remote-add.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test-remote-add.sh b/tests/test-remote-add.sh
index 5e1a0eed..cf9720d7 100755
--- a/tests/test-remote-add.sh
+++ b/tests/test-remote-add.sh
@@ -45,6 +45,24 @@ $OSTREE remote add --if-not-exists --no-gpg-verify another-noexist http://anothe
$OSTREE remote show-url another-noexist >/dev/null
echo "ok"
+$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_not_file_has_content list.txt "http://example.com/ostree/gnome"
+assert_not_file_has_content list.txt "http://another.com/repo"
+assert_not_file_has_content list.txt "http://another-noexist.example.com/anotherrepo"
+echo "ok remote list"
+
+$OSTREE remote list --show-urls > 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 "http://example.com/ostree/gnome"
+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"
+
$OSTREE remote delete another
echo "ok remote delete"
@@ -68,3 +86,10 @@ if $OSTREE remote show-url origin 2>/dev/null; then
assert_not_reached "Deleting remote unexpectedly failed"
fi
echo "ok"
+
+$OSTREE remote list > list.txt
+assert_not_file_has_content list.txt "origin"
+# Can't grep for 'another' because of 'another-noexist'
+assert_file_has_content list.txt "another-noexist"
+echo "ok remote list remaining"
+