Skip to content

Commit

Permalink
Kerberos tests: change expected line for later OS
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgePantelakis committed Jun 24, 2024
1 parent d8df5e5 commit 826ce25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Kerberos/test_kerberos_ssh_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pytest

from SCAutolib.models.authselect import Authselect
from SCAutolib.isDistro import isDistro


def test_krb_user_ssh(ipa_user, user_shell):
Expand Down Expand Up @@ -65,7 +66,10 @@ def test_krb_change_passwd_ssh(ipa_user, user_shell, ipa_login):
user_shell.sendline(f"whoami")
user_shell.expect_exact(ipa_user.username)
user_shell.sendline(f"passwd")
user_shell.expect_exact(f"Changing password for user {ipa_user.username}.")
if isDistro(['rhel', 'centos'], '>=10') or isDistro('fedora', '>=40'):
user_shell.expect_exact(f"Current password")
else:
user_shell.expect_exact(f"Changing password for user {ipa_user.username}.")


# Login with kerberos user using a smart card and then check if we can still ssh into the system
Expand Down
6 changes: 5 additions & 1 deletion Kerberos/test_kerberos_user_change_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import conftest
from SCAutolib.models.authselect import Authselect
from SCAutolib.isDistro import isDistro


@pytest.mark.parametrize("required,insert,expect,secret",
Expand Down Expand Up @@ -66,4 +67,7 @@ def test_kerberos_change_passwd(ipa_user, user_shell, required, insert, expect,
user_shell.sendline(cmd)
user_shell.expect_exact(expect)
user_shell.sendline(secret)
user_shell.expect_exact(f"Changing password for user {ipa_user.username}.")
if isDistro(['rhel', 'centos'], '>=10') or isDistro('fedora', '>=40'):
user_shell.expect_exact(f"Current password")
else:
user_shell.expect_exact(f"Changing password for user {ipa_user.username}.")

0 comments on commit 826ce25

Please sign in to comment.