Skip to content

Commit

Permalink
Test capsule without registration module
Browse files Browse the repository at this point in the history
  • Loading branch information
shweta83 committed Jan 2, 2024
1 parent 55b6ce3 commit 7816b2f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/foreman/api/test_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,14 @@ def test_negative_global_registration_without_ak(module_target_sat):
with pytest.raises(HTTPError) as context:
module_target_sat.api.RegistrationCommand().create()
assert 'Missing activation key!' in context.value.response.text


def test_positive_capsule_without_registration_module(module_target_sat, module_capsule_configured):
module_target_sat.api.SmartProxy().search(
query={'search': f'name = {module_capsule_configured.hostname}'}
)[0]
res = module_capsule_configured.install(
cmd_args={},
cmd_kwargs={'foreman-proxy-registration': 'false', 'foreman-proxy-templates': 'true'},
)
assert res.status == 0

0 comments on commit 7816b2f

Please sign in to comment.