Skip to content

Improve test coverage for prepare plugins in image mode#4719

Merged
happz merged 27 commits intomainfrom
issue-4606
Apr 22, 2026
Merged

Improve test coverage for prepare plugins in image mode#4719
happz merged 27 commits intomainfrom
issue-4606

Conversation

@thrix
Copy link
Copy Markdown
Contributor

@thrix thrix commented Mar 19, 2026

Incorporate the image mode testing into the plugins' tests and remove the separate bootc specific testing.
Running the plugins test exercises all the cases as in package mode and provides good confidence about the
image mode testing support.

The testing is done against F44 and CS10 image mode cloud base images provided by Testing Farm.

Run the testing in a separate /provision/virtual-image-mode plan, because the testing will similar
time to run as /provision/virtual.

Fixes #4606

Pull Request Checklist

  • implement the feature
  • extend the test coverage

Assisted-by: Claude Code

@thrix thrix added test coverage Improvements or additions to test coverage of tmt itself ci | full test Pull request is ready for the full test execution plugin | install The prepare plugin for installing packages labels Mar 19, 2026
Copy link
Copy Markdown
Contributor

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

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 significantly improves test coverage for prepare plugins in image mode by refactoring existing tests and adding new ones for bootc-based guests. It also implements missing methods in the Bootc package manager to support these tests. The changes are well-structured and the new test infrastructure is a valuable addition. I have one suggestion to simplify some of the new shell helper functions for better readability.

Comment thread tests/images.sh Outdated
@thrix thrix marked this pull request as draft March 19, 2026 07:42
@github-project-automation github-project-automation Bot moved this to backlog in planning Mar 19, 2026
@LecrisUT LecrisUT moved this from backlog to implement in planning Mar 19, 2026
@thrix thrix force-pushed the issue-4606 branch 2 times, most recently from 65f03c7 to 022036b Compare March 22, 2026 12:05
Comment thread plans/provision/virtual.fmf Outdated
@thrix thrix marked this pull request as ready for review March 23, 2026 12:15
@thrix thrix moved this from implement to review in planning Mar 23, 2026
@thrix thrix requested review from LecrisUT, happz and psss March 24, 2026 00:17
@psss psss added this to the 1.70 milestone Mar 24, 2026
Comment thread plans/provision/virtual.fmf Outdated
Comment thread plans/provision/virtual.fmf Outdated
Comment thread plans/provision/virtual.fmf Outdated
Comment thread tests/prepare/install/test.sh Outdated
Comment thread .packit.yaml Outdated
Comment thread tests/prepare/install/test.sh Outdated
Comment thread tests/prepare/install/test.sh Outdated
Comment thread tests/prepare/install/test.sh Outdated
Comment thread tests/prepare/install/test.sh Outdated
Comment thread tests/prepare/install/test.sh Outdated
@thrix thrix requested review from LecrisUT and thrix-bot March 26, 2026 01:09
@thrix
Copy link
Copy Markdown
Contributor Author

thrix commented Mar 26, 2026

@gemini-code-assist please review

Copy link
Copy Markdown
Contributor

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

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 introduces comprehensive support for 'image-mode' guests within the TMT framework. Key changes include updating .packit.yaml and plans/provision/virtual.fmf to define a new provision-virtual-image-mode job and FMF plan, along with adding specific image definitions and helper functions in tests/images.sh. The testing infrastructure has been significantly adapted across tests/prepare/install/test.sh, tests/prepare/recommend/test.sh, and tests/prepare/shell/test.sh to accommodate image-mode specific behaviors like Containerfile builds, image switches, and reboot persistence. Core package management logic for image-mode guests, including COPR repository handling and package installation, has been implemented in tmt/package_managers/bootc.py. Several old test files related to bootc and CentOS Stream 10 have been removed.

@thrix thrix force-pushed the issue-4606 branch 2 times, most recently from 0a72ea2 to 221d6c3 Compare March 26, 2026 02:29
Comment thread .packit.yaml Outdated
Comment thread tests/prepare/install/test.sh Outdated
Comment thread tests/prepare/recommend/test.sh
Comment thread tests/prepare/install/test.sh Outdated
Comment thread tests/prepare/install/test.sh Outdated
Comment thread tests/prepare/install/test.sh Outdated
Comment thread tests/prepare/install/test.sh Outdated
@thrix-bot
Copy link
Copy Markdown

Fixed the provision-virtual-image-mode test failures:

Assisted-by: Claude Code

@LecrisUT

This comment was marked as resolved.

thrix and others added 25 commits April 22, 2026 20:10
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Co-authored-by: Cristian Le <git@lecris.dev>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Script from remote url is broken, see #4785

Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
The `image` and `in_subdirectory` variables in
`fetch_downloaded_packages()` were not declared `local`, so when
`IMAGE_MODE=yes` the function overwrote the global loop `$image`
(e.g. from the full qcow2 URL to `fedora:44`). Subsequent phases
like "Install existing and invalid packages" then saw the wrong
value, causing `is_image_mode` to return false and the test to
check the wrong error message assertion.

Assisted-by: Claude Code
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
hopefully the last fix for the Multiple Commandline Scripts
fix-multi-script
fix-multi-script
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
English
@happz
Copy link
Copy Markdown
Contributor

happz commented Apr 22, 2026

Linkcheck failed because of target site being down, merging.

@happz happz merged commit 5465197 into main Apr 22, 2026
31 of 33 checks passed
@happz happz deleted the issue-4606 branch April 22, 2026 19:37
@github-project-automation github-project-automation Bot moved this from merge to done in planning Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci | full test Pull request is ready for the full test execution plugin | install The prepare plugin for installing packages test coverage Improvements or additions to test coverage of tmt itself

Projects

Status: done

Development

Successfully merging this pull request may close these issues.

Improve test coverage for prepare plugins in image mode

6 participants