Skip to content

Commit

Permalink
[6.12.z] Make oscap profile configurable in settings file (#14667)
Browse files Browse the repository at this point in the history
Make oscap profile configurable in settings file (#14535)

to enable tests for OS other than rhel

(cherry picked from commit ca8ab78)

Co-authored-by: dosas <[email protected]>
  • Loading branch information
Satellite-QE and dosas authored Apr 8, 2024
1 parent 81ecbf4 commit f2261ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions conf/oscap.yaml.template
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
OSCAP:
CONTENT_PATH: /usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml
# see: robottelo/constants/__init__.py OSCAP_PROFILE
PROFILE: security7
2 changes: 1 addition & 1 deletion pytest_fixtures/component/oscap.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def scap_content(import_ansible_roles, module_target_sat):
scap_profile_id = [
profile['id']
for profile in scap_info.scap_content_profiles
if OSCAP_PROFILE['security7'] in profile['title']
if OSCAP_PROFILE[settings.oscap.profile] in profile['title']
][0]
return {
"title": title,
Expand Down
7 changes: 6 additions & 1 deletion robottelo/config/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@
Validator(
'oscap.content_path',
must_exist=True,
)
),
Validator(
'oscap.profile',
default='security7',
must_exist=True,
),
],
osp=[
Validator(
Expand Down

0 comments on commit f2261ff

Please sign in to comment.