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 Mar 28, 2024
1 parent 7bd2a07 commit a5d6e41
Show file tree
Hide file tree
Showing 3 changed files with 8 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
6 changes: 5 additions & 1 deletion robottelo/config/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@
Validator(
'oscap.content_path',
must_exist=True,
)
),
Validator(
'oscap.profile',
default='security7',
),
],
osp=[
Validator(
Expand Down

0 comments on commit a5d6e41

Please sign in to comment.