Skip to content

Commit

Permalink
Updated the assertion to align with the 'rex_snippet' var
Browse files Browse the repository at this point in the history
  • Loading branch information
amolpati30 committed Dec 9, 2024
1 parent a6af84e commit 0faf6eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/foreman/api/test_provisioningtemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 0faf6eb

Please sign in to comment.