summaryrefslogtreecommitdiff
path: root/tests/admin-test.sh
diff options
context:
space:
mode:
authorDan Nicholson <nicholson@endlessm.com>2017-09-08 10:18:10 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-09-11 10:53:20 +0000
commitadac42b6effbc748ade9f135a6b3f284a67e9dd4 (patch)
tree93a58192d36076e3198527dd6f55c8a894d59969 /tests/admin-test.sh
parentccbbf77c7107e015b5f9ed5084504b6436f2353a (diff)
downloadostree-adac42b6effbc748ade9f135a6b3f284a67e9dd4.tar.gz
repo: Add add-remotes-config-dir option
This option allows a repo to explicitly opt out of adding new remotes in a remotes configuration directory. This currently defaults to true for system repos and false for non-system repos to maintain legacy behavior that non-system repos don't add remotes in a configuration directory. That would be problematic for flatpak, which specifies a remotes config dir but adds remotes in ways that are incompatible with it. So, what this really does is allow system repos to control whether they want to add remotes in the config dir or not. That's important if your flatpak repo is the system repo like at Endless. Closes: #1134 Closes: #1155 Approved by: cgwalters
Diffstat (limited to 'tests/admin-test.sh')
-rw-r--r--tests/admin-test.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/admin-test.sh b/tests/admin-test.sh
index 805a7130..f5d33a6f 100644
--- a/tests/admin-test.sh
+++ b/tests/admin-test.sh
@@ -19,7 +19,7 @@
set -euo pipefail
-echo "1..$((21 + ${extra_admin_tests:-0}))"
+echo "1..$((22 + ${extra_admin_tests:-0}))"
function validate_bootloader() {
cd ${test_tmpdir};
@@ -292,6 +292,15 @@ assert_not_file_has_content sysroot/ostree/repo/config remote-test-nonphysical
assert_file_has_content ${deployment}/etc/ostree/remotes.d/remote-test-nonphysical.conf testos-repo
echo "ok remote add nonphysical sysroot"
+# Test that setting add-remotes-config-dir to false adds a remote in the
+# config file rather than the remotes config dir even though this is a
+# "system" repo.
+${CMD_PREFIX} ostree --repo=sysroot/ostree/repo config set core.add-remotes-config-dir false
+${CMD_PREFIX} ostree --sysroot=${deployment} remote add --set=gpg-verify=false remote-test-config-dir file://$(pwd)/testos-repo
+assert_not_has_file ${deployment}/etc/ostree/remotes.d/remote-test-config-dir.conf testos-repo
+assert_file_has_content sysroot/ostree/repo/config remote-test-config-dir
+echo "ok remote add nonphysical sysroot add-remotes-config-dir false"
+
if env OSTREE_SYSROOT_DEBUG="${OSTREE_SYSROOT_DEBUG},test-fifreeze" \
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime 2>err.txt; then
fatal "fifreeze-test exited successfully?"