From eba29c9007aecad71282f3138cd1cd1c3e95f720 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Sat, 10 Sep 2022 13:52:15 +0200 Subject: [PATCH] test/ostree-raw: replace default ostree remote URL The Fedora IoT Raw image sets the default remote URL to the official Fedora IoT source at build time. We need to replace it in our tests with our local test repo. --- test/cases/ostree-raw-image.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/cases/ostree-raw-image.sh b/test/cases/ostree-raw-image.sh index dc2cdaf91..cda1abe2b 100755 --- a/test/cases/ostree-raw-image.sh +++ b/test/cases/ostree-raw-image.sh @@ -643,6 +643,14 @@ greenprint "🧽 Clean up upgrade blueprint and compose" sudo composer-cli compose delete "${COMPOSE_ID}" > /dev/null sudo composer-cli blueprints delete upgrade > /dev/null +if [[ "$ID" == "fedora" ]]; then + # The Fedora IoT Raw image sets the fedora-iot remote URL to https://ostree.fedoraproject.org/iot + # Replacing with our own local repo + greenprint "Replacing default remote" + sudo ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" admin@${UEFI_GUEST_ADDRESS} "echo ${EDGE_USER_PASSWORD} |sudo -S ostree remote delete ${OSTREE_OSNAME}" + sudo ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" admin@${UEFI_GUEST_ADDRESS} "echo ${EDGE_USER_PASSWORD} |sudo -S ostree remote add --no-gpg-verify ${OSTREE_OSNAME} ${STAGE_REPO_URL}" +fi + # Upgrade image/commit. greenprint "🗳 Upgrade ostree image/commit" sudo ssh "${SSH_OPTIONS[@]}" -i "${SSH_KEY}" admin@${UEFI_GUEST_ADDRESS} "echo ${EDGE_USER_PASSWORD} |sudo -S rpm-ostree upgrade"