Skip to content

Commit efde470

Browse files
committedJun 28, 2024·
Change password expect to regex
1 parent ff87c79 commit efde470

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎Kerberos/test_kerberos_ssh_login.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def test_krb_change_passwd_ssh(ipa_user, user_shell, ipa_login):
6767
user_shell.expect_exact(ipa_user.username)
6868
user_shell.sendline(f"passwd")
6969
if isDistro(['rhel', 'centos'], '>=10') or isDistro('fedora', '>=40'):
70-
user_shell.expect_exact(f"Current password")
70+
user_shell.expect(r"[cC]urrent [pP]assword")
7171
else:
7272
user_shell.expect_exact(f"Changing password for user {ipa_user.username}.")
7373

‎Kerberos/test_kerberos_user_change_password.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ def test_kerberos_change_passwd(ipa_user, user_shell, required, insert, expect,
6868
user_shell.expect_exact(expect)
6969
user_shell.sendline(secret)
7070
if isDistro(['rhel', 'centos'], '>=10') or isDistro('fedora', '>=40'):
71-
user_shell.expect_exact(f"Current password")
71+
user_shell.expect(r"[cC]urrent [pP]assword")
7272
else:
7373
user_shell.expect_exact(f"Changing password for user {ipa_user.username}.")

‎Local-user/test_local_user_passwd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ def test_change_local_user_passwd(local_user, user_shell, required, lock_on_remo
4747
user_shell.expect_exact(f"PIN for {local_user.username}:")
4848
user_shell.sendline(local_user.pin)
4949
if isDistro(['rhel', 'centos'], '>=10') or isDistro('fedora', '>=40'):
50-
user_shell.expect_exact(f"Current password")
50+
user_shell.expect(r"[cC]urrent [pP]assword")
5151
else:
5252
user_shell.expect_exact(f"Changing password for user {local_user.username}.")

0 commit comments

Comments
 (0)
Please sign in to comment.