Skip to content

Commit

Permalink
Fix AK for errata CLI tests (#16742)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsedmik authored Nov 1, 2024
1 parent 4e77e19 commit 1300483
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 12 additions & 2 deletions robottelo/host_helpers/cli_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,12 @@ def setup_org_for_a_custom_repo(self, options=None):
# Associate activation key with CV just to be sure
try:
self._satellite.cli.ActivationKey.update(
{'content-view-id': cv_id, 'id': activationkey_id, 'organization-id': org_id}
{
'id': activationkey_id,
'organization-id': org_id,
'content-view-id': cv_id,
'lifecycle-environment-id': env_id,
}
)
except CLIReturnCodeError as err:
raise CLIFactoryError(
Expand Down Expand Up @@ -818,7 +823,12 @@ def _setup_org_for_a_rh_repo(self, options=None, force=False):
# Associate activation key with CV just to be sure
try:
self._satellite.cli.ActivationKey.update(
{'id': activationkey_id, 'organization-id': org_id, 'content-view-id': cv_id}
{
'id': activationkey_id,
'organization-id': org_id,
'content-view-id': cv_id,
'lifecycle-environment-id': env_id,
}
)
except CLIReturnCodeError as err:
raise CLIFactoryError(
Expand Down
1 change: 1 addition & 0 deletions tests/foreman/cli/test_errata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,7 @@ def new_module_ak(
):
new_module_ak = module_target_sat.api.ActivationKey(
environment=module_lce_library,
content_view=module_sca_manifest_org.default_content_view,
organization=module_sca_manifest_org,
).create()
# Ensure tools repo is enabled in the activation key
Expand Down

0 comments on commit 1300483

Please sign in to comment.