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.
This commit is contained in:
Achilleas Koutsou 2022-09-10 13:52:15 +02:00 committed by Tom Gundersen
parent 966049ec3c
commit eba29c9007

View file

@ -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"