Skip to content

Commit

Permalink
Merge pull request #12101 from Mab879/remove_rhel7_ctests
Browse files Browse the repository at this point in the history
Clean Up Tests Due to RHEL 7 Removal
  • Loading branch information
jan-cerny authored Jul 1, 2024
2 parents ed34d4a + f508ec6 commit 349ffa3
Show file tree
Hide file tree
Showing 28 changed files with 56 additions and 3,221 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{%- if product in ["fedora", "ol7", "ol8", "ol9", "rhcos4", "rhel7", "rhel8", "rhel9", "sle12", "sle15", "ubuntu2004", "ubuntu2204", "debian12"] %}}
{{%- if product in ["fedora", "ol7", "ol8", "ol9", "rhcos4", "sle12", "sle15", "ubuntu2004", "ubuntu2204", "debian12"] or 'rhel' in product %}}
{{%- set perm_x="-F perm=x " %}}
{{%- endif %}}

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ fixtext: |-
Add or update the following line in "/usr/lib/systemd/system/rescue.service":
{{% if product in ["fedora", "ol8", "ol9", "rhel8", "rhel9", "sle12", "sle15"] -%}}
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue
{{%- elif product in ["rhel7"] -%}}
ExecStart=-/bin/sh -c "/usr/sbin/sulogin; /usr/bin/systemctl --fail --no-block default"
{{%- else -%}}
ExecStart=-/bin/sh -c "/sbin/sulogin; /usr/bin/systemctl --fail --no-block default"
{{%- endif %}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/bin/bash
# platform = multi_platform_fedora,multi_platform_rhel,multi_platform_ol,multi_platform_rhv,multi_platform_sle
{{%- if product in ["rhel7"] %}}
# packages = authconfig
{{%- else %}}
# packages = authselect
{{%- endif %}}
# variables = var_accounts_passwords_pam_faillock_deny=3

if [ -f /usr/sbin/authconfig ]; then
Expand Down
12 changes: 6 additions & 6 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ To use Libvirt backend, you need to have:
- Package `qemu-guest-agent` installed
- Package `openscap` version 1.2.15 or higher installed
- `root` can login via ssh (it is recommended to setup key-based authentication)
- `root` can install packages (for RHEL7, it means subscription enabled).
- `root` can install packages (for RHEL, it means subscription enabled).
- `CPE_NAME` is present in `/etc/os-release`. Currently, Ubuntu doesn't ship
it in the stock image. See [this Ubuntu
bug](https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1472288).
Expand Down Expand Up @@ -397,12 +397,12 @@ If you would like to test the rule `sshd_disable_kerb_auth`:

Using Libvirt:
```
./automatus.py rule --libvirt qemu:///system ssg-test-suite-rhel7 --datastream ../build/ssg-rhel7-ds.xml sshd_disable_kerb_auth
./automatus.py rule --libvirt qemu:///system ssg-test-suite-rhel9 --datastream ../build/ssg-rhel9-ds.xml sshd_disable_kerb_auth
```

Using Podman:
```
./automatus.py rule --container ssg_test_suite --datastream ../build/ssg-rhel7-ds.xml sshd_disable_kerb_auth
./automatus.py rule --container ssg_test_suite --datastream ../build/ssg-rhel9-ds.xml sshd_disable_kerb_auth
```

or just call the `test_rule_in_container.sh` script that passes the backend options for you
Expand All @@ -411,7 +411,7 @@ that remove some testing limitations of the container backend.

Using Docker:
```
./automatus.py rule --docker ssg_test_suite --datastream ../build/ssg-rhel7-ds.xml sshd_disable_kerb_auth
./automatus.py rule --docker ssg_test_suite --datastream ../build/ssg-rhel9-ds.xml sshd_disable_kerb_auth
```

Notice we didn't use full rule name on the command line. The prefix `xccdf_org.ssgproject.content_rule_` is added if not provided.
Expand Down Expand Up @@ -444,9 +444,9 @@ In this operation mode, you specify the `profile` command and you supply the
profile ID as a positional argument. Automatus then runs scans over the
target domain and remediates it based on particular profile.

To test RHEL7 STIG Profile on a VM:
To test RHEL9 STIG Profile on a VM:
```
./automatus.py profile --libvirt qemu:///session ssg-test-suite-rhel7 --datastream ../build/ssg-rhel7-ds.xml stig
./automatus.py profile --libvirt qemu:///session ssg-test-suite-rhel9 --datastream ../build/ssg-rhel9-ds.xml stig
```

To test Fedora Standard Profile on a Podman container:
Expand Down
Loading

0 comments on commit 349ffa3

Please sign in to comment.