Skip to content

Commit

Permalink
Change password expect to regex
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgePantelakis committed Jun 25, 2024
1 parent 826ce25 commit 5c1cedd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Kerberos/test_kerberos_ssh_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_krb_change_passwd_ssh(ipa_user, user_shell, ipa_login):
user_shell.expect_exact(ipa_user.username)
user_shell.sendline(f"passwd")
if isDistro(['rhel', 'centos'], '>=10') or isDistro('fedora', '>=40'):
user_shell.expect_exact(f"Current password")
user_shell.expect(r"[cC]urrent [pP]assword")
else:
user_shell.expect_exact(f"Changing password for user {ipa_user.username}.")

Expand Down
2 changes: 1 addition & 1 deletion Kerberos/test_kerberos_user_change_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ def test_kerberos_change_passwd(ipa_user, user_shell, required, insert, expect,
user_shell.expect_exact(expect)
user_shell.sendline(secret)
if isDistro(['rhel', 'centos'], '>=10') or isDistro('fedora', '>=40'):
user_shell.expect_exact(f"Current password")
user_shell.expect(r"[cC]urrent [pP]assword")
else:
user_shell.expect_exact(f"Changing password for user {ipa_user.username}.")
2 changes: 1 addition & 1 deletion Local-user/test_local_user_passwd.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ def test_change_local_user_passwd(local_user, user_shell, required, lock_on_remo
user_shell.expect_exact(f"PIN for {local_user.username}:")
user_shell.sendline(local_user.pin)
if isDistro(['rhel', 'centos'], '>=10') or isDistro('fedora', '>=40'):
user_shell.expect_exact(f"Current password")
user_shell.expect(r"[cC]urrent [pP]assword")
else:
user_shell.expect_exact(f"Changing password for user {local_user.username}.")

0 comments on commit 5c1cedd

Please sign in to comment.