Skip to content

Commit

Permalink
katello_host_tools_host no disable sca
Browse files Browse the repository at this point in the history
  • Loading branch information
pondrejk committed Apr 24, 2024
1 parent b2d303c commit 8736723
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions tests/foreman/cli/test_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -1481,9 +1481,6 @@ 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"""

sca_enabled = module_org.simple_content_access
module_org.sca_disable()

# get package details
details = {}
if katello_host_tools_host.os_version.major == 6:
Expand Down Expand Up @@ -1511,28 +1508,13 @@ def setup_custom_repo(target_sat, module_org, katello_host_tools_host, request):
).create()
custom_repo.sync()

subs = target_sat.api.Subscription(organization=module_org, name=prod.name).search()
assert len(subs), f'Subscription for sat client product: {prod.name} was not found.'
custom_sub = subs[0]

katello_host_tools_host.nailgun_host.bulk_add_subscriptions(
data={
"organization_id": module_org.id,
"included": {"ids": [katello_host_tools_host.nailgun_host.id]},
"subscriptions": [{"id": custom_sub.id, "quantity": 1}],
}
)
# make sure repo is enabled
katello_host_tools_host.enable_repo(
f'{module_org.name}_{prod.name}_{custom_repo.name}', force=True
)
# refresh repository metadata
katello_host_tools_host.subscription_manager_list_repos()
if sca_enabled:
yield details
module_org.sca_enable()
else:
return details
return details


@pytest.fixture
Expand Down

0 comments on commit 8736723

Please sign in to comment.