diff --git a/tests/kolainst/destructive/finalization.sh b/tests/kolainst/destructive/finalization.sh index 34624f5fa8..e0f0e90760 100755 --- a/tests/kolainst/destructive/finalization.sh +++ b/tests/kolainst/destructive/finalization.sh @@ -8,8 +8,13 @@ prepare_tmpdir case "${AUTOPKGTEST_REBOOT_MARK:-}" in "") - # Need to disable gpg verification for test builds - sed -i -e 's,gpg-verify=true,gpg-verify=false,' /etc/ostree/remotes.d/*.conf + # Need to disable gpg verification for test builds. + # On container-native FCOS there may be no remotes.d conf files. + for conf in /etc/ostree/remotes.d/*.conf; do + if test -f "$conf"; then + sed -i -e 's,gpg-verify=true,gpg-verify=false,' "$conf" + fi + done # xref https://github.com/coreos/coreos-assembler/pull/2814 systemctl mask --now zincati diff --git a/tests/kolainst/destructive/staged-deploy.sh b/tests/kolainst/destructive/staged-deploy.sh index 184da62cd1..5c54d121cc 100755 --- a/tests/kolainst/destructive/staged-deploy.sh +++ b/tests/kolainst/destructive/staged-deploy.sh @@ -8,8 +8,13 @@ prepare_tmpdir case "${AUTOPKGTEST_REBOOT_MARK:-}" in "") - # Need to disable gpg verification for test builds - sed -i -e 's,gpg-verify=true,gpg-verify=false,' /etc/ostree/remotes.d/*.conf + # Need to disable gpg verification for test builds. + # On container-native FCOS there may be no remotes.d conf files. + for conf in /etc/ostree/remotes.d/*.conf; do + if test -f "$conf"; then + sed -i -e 's,gpg-verify=true,gpg-verify=false,' "$conf" + fi + done # Test our generator test -f /run/systemd/generator/local-fs.target.requires/ostree-remount.service diff --git a/tests/kolainst/nondestructive/itest-remotes.sh b/tests/kolainst/nondestructive/itest-remotes.sh index d1fb455b50..73ae092bfc 100755 --- a/tests/kolainst/nondestructive/itest-remotes.sh +++ b/tests/kolainst/nondestructive/itest-remotes.sh @@ -12,6 +12,12 @@ trap _tmpdir_cleanup EXIT ostree remote list > remotes.txt if ! test -s remotes.txt; then + # On container-native FCOS, there are no ostree remotes — that's expected. + # On traditional ostree systems, missing remotes is a real regression. + if [ "$(rpmostree_query_json '.deployments[0]."container-image-reference" // empty')" != "" ]; then + echo "No ostree remotes found; skipping test on container-native system" + exit 0 + fi assert_not_reached "no ostree remotes" fi date