Skip to content
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

Add ansible testing to /per-rule #157

Merged
merged 4 commits into from
Apr 25, 2024
Merged

Add ansible testing to /per-rule #157

merged 4 commits into from
Apr 25, 2024

Conversation

comps
Copy link
Contributor

@comps comps commented Apr 24, 2024

This (in several commits) splits the /per-rule tests into oscap and ansible, to match the --remediate-using argument of automatus.py.

The split is done on the FMF metadata level to make all these inherit max1 and run in parallel - the thought is that Beaker jobs will spread themselves out much more evenly than when running oscap+ansible in one test, on one system.

OTOH /per-rule/from-env is likely intended to be run on a single system for both oscap and ansible, so I've added a re-use logic to lib.virt for non-snapshotted (meaning not snapshotted by Contest) logic for VMs, avoiding the second VM install, relying on automatus.py to use qcow2-internal snapshots.

Nitrate (TCMS) export to be done after PR merge.

comps added 4 commits April 24, 2024 16:12
'oscap' being the fix (remediation) type.

Signed-off-by: Jiri Jaburek <[email protected]>
Signed-off-by: Jiri Jaburek <[email protected]>
This allows multiple tests to share one VM, just like with snapshots,
but without the snapshots.

Useful for tests that aren't fully destructive, but still share some
common setup, ie. 'automatus.py', which has its own snapshotting
logic.

In these cases, we don't need to re-install the VM every time,
we just need to ensure it is successfully installed once.

Signed-off-by: Jiri Jaburek <[email protected]>
@comps comps force-pushed the per_rule_ansible branch from 0340b4b to 99f5816 Compare April 24, 2024 14:13
@comps comps marked this pull request as ready for review April 24, 2024 14:14
@comps comps marked this pull request as draft April 24, 2024 16:35
@comps comps marked this pull request as ready for review April 25, 2024 14:19
@matusmarhefka matusmarhefka merged commit 2505af8 into main Apr 25, 2024
3 checks passed
@matusmarhefka matusmarhefka deleted the per_rule_ansible branch April 25, 2024 14:24
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