Skip to content

Commit

Permalink
Make oscap profile configurable in settings file
Browse files Browse the repository at this point in the history
to enable tests for OS other than rhel
  • Loading branch information
dosas committed Apr 2, 2024
1 parent 7bd2a07 commit 194600b
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 194600b

Please sign in to comment.