Skip to content

Commit

Permalink
ensure mqtt capsule is not bypassed
Browse files Browse the repository at this point in the history
  • Loading branch information
pondrejk committed Jan 23, 2024
1 parent 22c4d59 commit d3d112a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tests/foreman/api/test_remoteexecution.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,15 @@ def test_positive_run_capsule_upgrade_playbook(module_capsule_configured, target
@pytest.mark.tier3
@pytest.mark.no_containers
@pytest.mark.rhel_ver_list('8')
@pytest.mark.parametrize('setting_update', ['remote_execution_global_proxy=False'], indirect=True)
def test_negative_time_to_pickup(
module_org,
module_target_sat,
smart_proxy_location,
module_ak_with_cv,
module_capsule_configured_mqtt,
rhel_contenthost,
setting_update,
):
"""Time to pickup setting is honored for host registered to mqtt
Expand Down Expand Up @@ -131,13 +133,6 @@ def test_negative_time_to_pickup(
result = rhel_contenthost.execute('systemctl stop yggdrasild')
assert result.status == 0, f'Failed to stop yggdrasil on client: {result.stderr}'

# Make sure the job is executed by the registered-trough capsule
global_ttp = module_target_sat.api.Setting().search(
query={'search': 'name="remote_execution_global_proxy"'}
)[0]
global_ttp.value = False
global_ttp.update(['value'])

# run script provider rex command with time_to_pickup
job = module_target_sat.api.JobInvocation().run(
synchronous=False,
Expand Down
8 changes: 8 additions & 0 deletions tests/foreman/cli/test_remoteexecution.py
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,9 @@ class TestPullProviderRex:
@pytest.mark.upgrade
@pytest.mark.no_containers
@pytest.mark.rhel_ver_match('[^6].*')
@pytest.mark.parametrize(
'setting_update', ['remote_execution_global_proxy=False'], indirect=True
)
def test_positive_run_job_on_host_converted_to_pull_provider(
self,
module_org,
Expand All @@ -1243,6 +1246,7 @@ def test_positive_run_job_on_host_converted_to_pull_provider(
module_target_sat,
module_capsule_configured_mqtt,
rhel_contenthost,
setting_update,
):
"""Run custom template on host converted to mqtt
Expand Down Expand Up @@ -1339,6 +1343,9 @@ def test_positive_run_job_on_host_converted_to_pull_provider(
@pytest.mark.e2e
@pytest.mark.no_containers
@pytest.mark.rhel_ver_match('[^6].*')
@pytest.mark.parametrize(
'setting_update', ['remote_execution_global_proxy=False'], indirect=True
)
def test_positive_run_job_on_host_registered_to_pull_provider(
self,
module_org,
Expand All @@ -1347,6 +1354,7 @@ def test_positive_run_job_on_host_registered_to_pull_provider(
module_ak_with_cv,
module_capsule_configured_mqtt,
rhel_contenthost,
setting_update,
):
"""Run custom template on host registered to mqtt, check effective user setting
Expand Down

0 comments on commit d3d112a

Please sign in to comment.