Skip to content

tests/kolainst: Fix failures on container-native FCOS#3602

Merged
cgwalters merged 1 commit into
ostreedev:mainfrom
jmarrero:ci-fixes2
Jun 26, 2026
Merged

tests/kolainst: Fix failures on container-native FCOS#3602
cgwalters merged 1 commit into
ostreedev:mainfrom
jmarrero:ci-fixes2

Conversation

@jmarrero

Copy link
Copy Markdown
Member

On container-native FCOS (F44+), /etc/ostree/remotes.d/ may have no .conf files since the system uses container-based updates rather than traditional ostree remotes. This caused test failures:

  • staged-deploy.sh and finalization.sh: sed on the unexpanded glob '/etc/ostree/remotes.d/*.conf' fails under set -euo pipefail when no files match. Fix by iterating with a for loop and guarding with test -f.

  • itest-remotes.sh: 'ostree remote list' returns empty, hitting assert_not_reached. Fix by skipping the test gracefully on systems with no remotes configured.

Assisted-by: OpenCode (Claude Opus 4.6)

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates several test scripts to handle container-native Fedora CoreOS (FCOS) environments where ostree remote configuration files or remotes may not exist. Specifically, it avoids glob failures when disabling GPG verification and allows skipping the remote tests if no remotes are configured. The review feedback points out that unconditionally skipping the remote tests when no remotes are found could lead to silent test coverage loss on traditional systems. It is recommended to restrict this skip specifically to container-native deployments by checking the deployment type.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines 14 to 18
if ! test -s remotes.txt; then
assert_not_reached "no ostree remotes"
# Container-native FCOS may not have any ostree remotes configured
echo "No ostree remotes found; skipping test on container-native system"
exit 0
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Unconditionally skipping the test when remotes.txt is empty can lead to silent test coverage loss. If a regression on a traditional (non-container-native) system causes all remotes to be missing, the test will now silently pass (skip) instead of failing. We should restrict this graceful skip only to container-native systems by checking the deployment type using rpm-ostree status.

Suggested change
if ! test -s remotes.txt; then
assert_not_reached "no ostree remotes"
# Container-native FCOS may not have any ostree remotes configured
echo "No ostree remotes found; skipping test on container-native system"
exit 0
fi
if ! test -s remotes.txt; then
if [ "$(rpmostree_query_json '.deployments[0].type')" = "container" ]; then
# Container-native FCOS may not have any ostree remotes configured
echo "No ostree remotes found; skipping test on container-native system"
exit 0
else
assert_not_reached "no ostree remotes"
fi
fi

On container-native FCOS (F44+), /etc/ostree/remotes.d/ may have no
.conf files since the system uses container-based updates rather than
traditional ostree remotes. This caused test failures:

- staged-deploy.sh and finalization.sh: sed on the unexpanded glob
  '/etc/ostree/remotes.d/*.conf' fails under set -euo pipefail when
  no files match. Fix by iterating with a for loop and guarding with
  test -f.

- itest-remotes.sh: 'ostree remote list' returns empty, hitting
  assert_not_reached. Fix by skipping the test gracefully on systems
  with no remotes configured.

Assisted-by: OpenCode (Claude Opus 4.6)
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
@cgwalters cgwalters merged commit b66ead7 into ostreedev:main Jun 26, 2026
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants