@skip_if_github_validation
@scope_openscap
@scope_res
@rhlike_minion
Feature: 0043 - OpenSCAP audit of Red Hat-like Salt minion
Description: In order to audit a Red Hat-like Salt minion
As an authorized user
I want to run an OpenSCAP scan on it
File name: min_rhlike_openscap_audit.feature
Relative path: secondary/min_rhlike_openscap_audit.feature
@skip_if_github_validation
@scope_openscap
@scope_res
@rhlike_minion
Scenario: Enable repositories for openSCAP on the Red Hat-like minion
When
I enable the repositories "Rocky-BaseOS Rocky-AppStream" on this "rhlike_minion"
00:00:00.398
FAIL: yum clean all && yum makecache returned status code = -1. Output: (ScriptError) ./features/support/remote_node.rb:172:in `run_local' ./features/support/remote_node.rb:120:in `run' ./features/step_definitions/common_steps.rb:298:in `/^I refresh the metadata for "([^"]*)"$/' features/secondary/min_rhlike_openscap_audit.feature:18:in `I refresh the metadata for "rhlike_minion"'
@skip_if_github_validation
@scope_openscap
@scope_res
@rhlike_minion
Scenario: Install the OpenSCAP packages on the Red Hat-like minion
Given
I am on the Systems overview page of this "rhlike_minion"
00:00:01.623
And
I install OpenSCAP dependencies on "rhlike_minion"
00:01:04.405
And
I follow "Software" in the content area
00:00:00.078
And
I click on "Update Package List"
00:00:00.763
And
I wait until event "Package List Refresh" is completed
00:00:38.740
@skip_if_github_validation
@scope_openscap
@scope_res
@rhlike_minion
Scenario: Schedule an OpenSCAP audit job on the Red Hat-like minion
Given
I am on the Systems overview page of this "rhlike_minion"
00:00:01.606
When
I follow "Audit" in the content area
00:00:00.082
And
I follow "OpenSCAP" in the content area
00:00:00.075
And
I follow "Schedule" in the content area
00:00:00.069
And
I wait at most 30 seconds until I do not see "This system does not yet have OpenSCAP scan capability." text, refreshing the page
00:00:00.072
And
I enter "--profile xccdf_org.ssgproject.content_profile_anssi_bp28_intermediary" as "params"
00:00:00.127
And
I enter "/usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml" as "path"
00:00:00.091
And
I click on "Schedule"
00:00:00.061
Then
I should see a "XCCDF scan has been scheduled" text
00:00:00.072
And
I wait at most 500 seconds until event "OpenSCAP xccdf scanning" is completed
00:01:11.590
@skip_if_github_validation
@scope_openscap
@scope_res
@rhlike_minion
Scenario: Check the results of the OpenSCAP scan on the Red Hat-like minion
Given
I am on the Systems overview page of this "rhlike_minion"
00:00:01.720
When
I follow "Audit" in the content area
00:00:00.080
And
I follow "OpenSCAP" in the content area
00:00:00.068
And
I follow "xccdf_org.open-scap_testresult"
00:00:01.030
Then
I should see a "Details of XCCDF Scan" text
00:00:00.217
And
I should see a "RHEL-8" text
00:00:00.201
And
I should see a "XCCDF Rule Results" text
00:00:00.203
@skip_if_github_validation
@scope_openscap
@scope_res
@rhlike_minion
Scenario: Cleanup: remove audit scans retention period from Red Hat-like minion
When
I follow the left menu "Admin > Organizations"
00:00:00.145
When
I follow "SUSE Test" in the content area
00:00:00.066
And
I follow "Configuration" in the content area
00:00:00.064
And
I enter "0" as "scap_retention_period"
00:00:00.057
And
I click on "Update Organization"
00:00:00.412
Then
I should see a "Organization SUSE Test was successfully updated." text
00:00:00.064
@skip_if_github_validation
@scope_openscap
@scope_res
@rhlike_minion
Scenario: Cleanup: delete audit results from Red Hat-like minion
Given
I am on the Systems overview page of this "rhlike_minion"
00:00:01.596
When
I follow "Audit" in the content area
00:00:00.063
And
I follow "OpenSCAP" in the content area
00:00:00.055
And
I follow "List Scans" in the content area
00:00:00.067
And
I click on "Select All"
00:00:00.494
And
I click on "Remove"
00:00:00.800
And
I click on "Confirm"
00:00:01.693
Then
I should see a " SCAP Scan(s) deleted. 0 SCAP Scan(s) retained" text
00:00:00.069
@skip_if_github_validation
@scope_openscap
@scope_res
@rhlike_minion
Scenario: Cleanup: restore audit scans retention period on Red Hat-like minion
When
I follow the left menu "Admin > Organizations"
00:00:00.113
When
I follow "SUSE Test" in the content area
00:00:00.061
And
I follow "Configuration" in the content area
00:00:00.058
And
I enter "90" as "scap_retention_period"
00:00:00.046
And
I click on "Update Organization"
00:00:00.454
Then
I should see a "Organization SUSE Test was successfully updated." text
00:00:00.064
@skip_if_github_validation
@scope_openscap
@scope_res
@rhlike_minion
Scenario: Cleanup: remove the OpenSCAP packages from the Red Hat-like minion
When
I remove OpenSCAP dependencies from "rhlike_minion"
00:00:04.867
And
I disable repository "Rocky-BaseOS" on this "rhlike_minion"
00:00:00.189
@skip_if_github_validation
@scope_openscap
@scope_res
@rhlike_minion
Scenario: Cleanup: restore the base channel for the Red Hat-like minion
Given
I am on the Systems overview page of this "rhlike_minion"
00:00:01.530
When
I follow "Software" in the content area
00:00:00.069
And
I follow "Software Channels" in the content area
00:00:00.086
And
I wait until I do not see "Loading..." text
00:00:00.066
Warning: Radio button 'Fake-Base-Channel-RH-like' is already checked
And
I wait until I do not see "Loading..." text
00:00:00.329
And
I click on "Next"
00:00:00.066
Then
I should see a "Confirm Software Channel Change" text
00:00:00.064
When
I click on "Confirm"
00:00:00.062
Then
I should see a "Changing the channels has been scheduled." text
00:00:01.259
And
I wait until event "Subscribe channels scheduled" is completed
00:00:18.892