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
  • Loading branch information
ogajduse committed Nov 21, 2023
1 parent 3e1f600 commit b429857
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 @@ -1498,9 +1498,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 @@ -1546,9 +1545,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 b429857

Please sign in to comment.