Skip to content

Commit

Permalink
use gr method instead of sub-man to register hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaysawant committed Nov 14, 2024
1 parent 260fbcd commit 0307996
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/foreman/cli/test_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -2878,7 +2878,11 @@ def test_positive_verify_host_statuses(
assert rh.subscribed

domain_name = list(valid_domain_names(length=15).values())[0]
org = function_sca_manifest_org.name
org = function_sca_manifest_org

gr_command = target_sat.execute(
f'hammer host-registration generate-command --activation-key {ak.name} --organization-id {org.id} --insecure true --force true'
)

# 2. Register N number of fake content hosts with Satellite
for _i in range(20):
Expand All @@ -2890,12 +2894,7 @@ def test_positive_verify_host_statuses(
)
assert rh.execute('hostnamectl set-hostname ${short}.${uuid%%-*}.${domain}').status == 0
assert rh.execute('subscription-manager clean').status == 0
assert (
rh.execute(
f'subscription-manager register --activationkey {ak.name} --org {org} --force'
).status
== 0
)
assert rh.execute(f'{gr_command.stdout}').status == 0

# 3. Promote CV Version to LCE, during this process delete few hosts using hammer cli command
cv.publish()
Expand Down

0 comments on commit 0307996

Please sign in to comment.