-
Notifications
You must be signed in to change notification settings - Fork 35
ci: Add container integration test for rpm and bootc #264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Add container integration test for rpm and bootc #264
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #264 +/- ##
==========================================
- Coverage 61.09% 60.56% -0.54%
==========================================
Files 2 2
Lines 910 923 +13
==========================================
+ Hits 556 559 +3
- Misses 354 364 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I.e. the bootc scenarios are quick no-ops due to not being supported here. |
04fc5b6 to
8709e93
Compare
8709e93 to
2e19ec5
Compare
2e19ec5 to
14fc24b
Compare
tests/tests_reload_on_reset.yml
Outdated
| name: podman | ||
| name: | ||
| - podman | ||
| - /usr/bin/ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduces a dependency at ostree build time - either some package needs to be added to https://github.com/linux-system-roles/firewall/blob/main/.ostree/packages-testing.txt or possibly one of the platform specific files. I don't know if image builder can use a file, or if it requires the name of a package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack! Done.
In some environments, such as a CentOS 9 container, "ping" is not pre-installed. The test calls it, so install it explicitly.
Generalize qemu-kvm-integration-tests.yml to run some "container-*" environments as well. For "classic rpm" OSes that does not give us too much beyond making sure that the container tests actually work (developers might use them locally, after all). 90% of the logic (setup, compatibility check, status updates, etc.) is the same, so it's not economic to duplicate all of that into a new workflow. Add Fedora/CentOS *-bootc scenarios: These check that our role works during a bootc container build, without any systemd, processes, or other runtime environment. tox-lsr added support for this in linux-system-roles/tox-lsr#188. However, as most roles don't currently work in that environment, introduce and check a new `containerbuild` tag in meta/main.yml. We'll add this to roles as we adjust them. Similarly, as not every role works in a running container (e.g. due to assuming SELinux), check a new `container` tag in their tests.
Feature: Support running the firewall role in system container environments. Result: These flags enable running the "classic rpm" scenarios in CI, which ensures that the role works in podman system containers. Note: This role does *not* work (yet) during container builds such as bootc "buildah" environments. Thus do not yet add the "containerbuild" tag.
14fc24b to
24a225f
Compare
Same as in linux-system-roles/sudo#52 to check the new mechanics for a more complex role. This is a case where the role works fine in a system container, but not yet during a bootc container build. I'm working on that in my https://github.com/martinpitt/lsr-firewall/tree/bootc-container-test branch, see https://issues.redhat.com/browse/RHEL-88425 . But this is a nice stepping stone.