Skip to content

Commit

Permalink
Adding test for preparing users for sca in 6.16
Browse files Browse the repository at this point in the history
  • Loading branch information
ColeHiggins2 committed Oct 23, 2023
1 parent af1e9ec commit f774760
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/foreman/cli/test_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,27 @@ def test_positive_auto_attach_disabled_golden_ticket(
with pytest.raises(CLIReturnCodeError) as context:
Host.subscription_auto_attach({'host-id': host_id})
assert "This host's organization is in Simple Content Access mode" in str(context.value)


@pytest.mark.tier2
def test_positive_prepare_for_sca_only_hammer(function_org, target_sat):
"""Verify that upon certain actions, Hammer notifies users that Simple Content Access
will be required for all organizations in Satellite 6.16
:id: 8753adb9-28ff-4a16-b04e-0af532452f32
:expectedresults: Hammer returns a message notifying users that Simple Content Access
will be required for all organizations in Satellite 6.16
"""
org_results = target_sat.execute(
f'hammer organization update --id {function_org.id} --simple-content-access false'
)
assert 'Simple Content Access will be required for all organizations in Katello 4.12' in str(
org_results.stderr
)
sca_results = target_sat.execute(
f'hammer simple-content-access disable --organization-id {function_org.id}'
)
assert 'Simple Content Access will be required for all organizations in Katello 4.12' in str(
sca_results.stderr
)

0 comments on commit f774760

Please sign in to comment.