Skip to content

Commit

Permalink
changed requirements for activation keys (#16573)
Browse files Browse the repository at this point in the history
  • Loading branch information
pondrejk authored Nov 18, 2024
1 parent e5b692d commit 7255e93
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/foreman/longrun/test_oscap.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,16 @@ def activation_key(module_target_sat, module_org, lifecycle_env):
content_view = module_target_sat.api.ContentView(
organization=module_org, name=repo.get('cvname')
).create()
content_view.publish()
content_view = content_view.read()
assert len(content_view.version) == 1, "CV not publised"
version = content_view.version[0].read()
version.promote(data={'environment_ids': lifecycle_env.id, 'force': True})
activation_key = module_target_sat.api.ActivationKey(
name=repo.get('akname'), environment=lifecycle_env, organization=module_org
name=repo.get('akname'),
environment=lifecycle_env,
content_view=content_view,
organization=module_org,
).create()
# Setup org for a custom repo for RHEL6, RHEL7 and RHEL8.
module_target_sat.cli_factory.setup_org_for_a_custom_repo(
Expand Down

0 comments on commit 7255e93

Please sign in to comment.