Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure mqtt capsule is not bypassed #13817

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tests/foreman/api/test_remoteexecution.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,20 @@ 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'],
ids=["no_global_proxy"],
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 +138,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
14 changes: 14 additions & 0 deletions tests/foreman/cli/test_remoteexecution.py
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,12 @@ 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'],
ids=["no_global_proxy"],
indirect=True,
)
def test_positive_run_job_on_host_converted_to_pull_provider(
self,
module_org,
Expand All @@ -1243,6 +1249,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 +1346,12 @@ 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'],
ids=["no_global_proxy"],
indirect=True,
)
def test_positive_run_job_on_host_registered_to_pull_provider(
self,
module_org,
Expand All @@ -1347,6 +1360,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
Loading