From dfbde5b06ae0028bcb67e7485cee6f4bb33895b0 Mon Sep 17 00:00:00 2001 From: amolpati30 <151733635+amolpati30@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:55:55 +0530 Subject: [PATCH] Updated the assertion to align with the 'rex_snippet' var. (#17088) Updated the assertion to align with the 'rex_snippet' var Foreman changes 1)https://github.com/theforeman/foreman/pull/10340 2)https://github.com/theforeman/foreman/pull/10236 --- tests/foreman/api/test_provisioningtemplate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/foreman/api/test_provisioningtemplate.py b/tests/foreman/api/test_provisioningtemplate.py index 7775e5f17f1..fb418177b38 100644 --- a/tests/foreman/api/test_provisioningtemplate.py +++ b/tests/foreman/api/test_provisioningtemplate.py @@ -585,7 +585,7 @@ def test_positive_template_check_rex_snippet( assert f'chown -R {rex_user}: ~{rex_user}' in rex_snippet assert f'chown -R {rex_user}: ~{rex_user}/.ssh' in rex_snippet assert ( - f'echo "{rex_user} ALL = (root) NOPASSWD : ALL" > /etc/sudoers.d/{rex_user}\necho "Defaults:{rex_user} !requiretty" >> /etc/sudoers.d/{rex_user}' + f'echo "{rex_user} ALL = (ALL) NOPASSWD : ALL" > /etc/sudoers.d/{rex_user}\necho "Defaults:{rex_user} !requiretty" >> /etc/sudoers.d/{rex_user}' in rex_snippet ) assert ssh_key in rex_snippet @@ -646,8 +646,8 @@ def test_positive_template_check_rex_pull_mode_snippet( pkg_manager = 'yum' if module_sync_kickstart_content.rhel_ver < 8 else 'dnf' assert f'{pkg_manager} -y install foreman_ygg_worker' in rex_snippet assert 'broker = ["mqtts://$SERVER_NAME:1883"]' in rex_snippet - assert 'systemctl try-restart yggdrasild' in rex_snippet - assert 'systemctl enable --now yggdrasild' in rex_snippet + assert 'systemctl try-restart $YGGDRASIL_SERVICE' in rex_snippet + assert 'systemctl enable --now $YGGDRASIL_SERVICE' in rex_snippet assert 'yggdrasil status' in rex_snippet assert 'Remote execution pull provider successfully configured!' in rex_snippet