Skip to content

Commit

Permalink
Yield details always, no need to check for SCA eligibility
Browse files Browse the repository at this point in the history
(cherry picked from commit e39ce21)
  • Loading branch information
ogajduse committed Nov 21, 2023
1 parent 3dd7e1c commit 5c3c98f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/foreman/cli/test_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -1495,9 +1495,8 @@ def test_positive_provision_baremetal_with_uefi_secureboot():
def setup_custom_repo(target_sat, module_org, katello_host_tools_host, request):
"""Create custom repository content"""

if sca_eligible := module_org.sca_eligible().get('simple_content_access_eligible', False):
sca_enabled = module_org.simple_content_access
module_org.sca_disable()
sca_enabled = module_org.simple_content_access
module_org.sca_disable()

# get package details
details = {}
Expand Down Expand Up @@ -1543,9 +1542,9 @@ def setup_custom_repo(target_sat, module_org, katello_host_tools_host, request):
)
# refresh repository metadata
katello_host_tools_host.subscription_manager_list_repos()
if sca_eligible:
yield
module_org.sca_enable() if sca_enabled else module_org.sca_disable()
if sca_enabled:
yield details
module_org.sca_enable()
else:
return details

Expand Down

0 comments on commit 5c3c98f

Please sign in to comment.