Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kerberos tests: change expected line for later OS #41

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}.")
Loading