-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TESTS: don't use deprecated sssd.conf::user option
Currently when SSSD is built '--with-sssd-user=sssd' it's also configured to run under 'sssd' user by default via sssd.service, so that sssd.conf::user option is ignored anyway. Since sssd.conf::user is deprecated and will go away, it doesn't make much sense to put effort into testing it. What makes sense is to test sssd.service::User option, but this is out of scope of this patch.
- Loading branch information
1 parent
0d5e8f1
commit 650f7df
Showing
5 changed files
with
11 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,7 @@ | |
|
||
@pytest.mark.topology(KnownTopologyGroup.AnyProvider) | ||
@pytest.mark.parametrize("method", ["su", "ssh"]) | ||
@pytest.mark.parametrize("sssd_service_user", ("root", "sssd")) | ||
@pytest.mark.require( | ||
lambda client, sssd_service_user: ((sssd_service_user == "root") or client.features["non-privileged"]), | ||
"SSSD was built without support for running under non-root", | ||
) | ||
def test_authentication__login(client: Client, provider: GenericProvider, method: str, sssd_service_user: str): | ||
def test_authentication__login(client: Client, provider: GenericProvider, method: str): | ||
""" | ||
:title: ssh/su login | ||
:setup: | ||
|
@@ -37,7 +32,6 @@ def test_authentication__login(client: Client, provider: GenericProvider, method | |
""" | ||
provider.user("user1").add(password="Secret123") | ||
|
||
client.sssd.set_service_user(sssd_service_user) | ||
client.sssd.start() | ||
|
||
assert client.auth.parametrize(method).password("user1", "Secret123"), "login with correct password failed" | ||
|
@@ -46,12 +40,7 @@ def test_authentication__login(client: Client, provider: GenericProvider, method | |
|
||
@pytest.mark.topology(KnownTopologyGroup.AnyProvider) | ||
@pytest.mark.parametrize("method", ["su", "ssh"]) | ||
@pytest.mark.parametrize("sssd_service_user", ("root", "sssd")) | ||
@pytest.mark.require( | ||
lambda client, sssd_service_user: ((sssd_service_user == "root") or client.features["non-privileged"]), | ||
"SSSD was built without support for running under non-root", | ||
) | ||
def test_authentication__offline_login(client: Client, provider: GenericProvider, method: str, sssd_service_user: str): | ||
def test_authentication__offline_login(client: Client, provider: GenericProvider, method: str): | ||
""" | ||
:title: Offline ssh/su login | ||
:setup: | ||
|
@@ -80,7 +69,6 @@ def test_authentication__offline_login(client: Client, provider: GenericProvider | |
wrong = "Wrong123" | ||
provider.user(user).add(password=correct) | ||
|
||
client.sssd.set_service_user(sssd_service_user) | ||
client.sssd.domain["cache_credentials"] = "True" | ||
client.sssd.domain["krb5_store_password_if_offline"] = "True" | ||
client.sssd.pam["offline_credentials_expiration"] = "0" | ||
|
@@ -103,12 +91,7 @@ def test_authentication__offline_login(client: Client, provider: GenericProvider | |
@pytest.mark.topology(KnownTopology.AD) | ||
@pytest.mark.ticket(gh=7174) | ||
@pytest.mark.parametrize("method", ["su", "ssh"]) | ||
@pytest.mark.parametrize("sssd_service_user", ("root", "sssd")) | ||
@pytest.mark.require( | ||
lambda client, sssd_service_user: ((sssd_service_user == "root") or client.features["non-privileged"]), | ||
"SSSD was built without support for running under non-root", | ||
) | ||
def test_authentication__login_using_email_address(client: Client, ad: AD, method: str, sssd_service_user: str): | ||
def test_authentication__login_using_email_address(client: Client, ad: AD, method: str): | ||
""" | ||
:title: Login using user's email address | ||
:description: | ||
|
@@ -128,7 +111,6 @@ def test_authentication__login_using_email_address(client: Client, ad: AD, metho | |
ad.user("user-2").add(password="Secret123", email="[email protected]") | ||
ad.user("user-3").add(password="Secret123", email="[email protected]") | ||
|
||
client.sssd.set_service_user(sssd_service_user) | ||
client.sssd.start() | ||
|
||
assert client.auth.parametrize(method).password( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters