Skip to content

Commit

Permalink
Drop tests:
Browse files Browse the repository at this point in the history
test_sssctl__check_invalid_pam_section_name (duplicate test_sssctl__check_invalid_sssd_section_name)
test_sssctl__check_invalid_nss_section_name (duplicate test_sssctl__check_invalid_sssd_section_name)

Signed-off-by: Denis Karpelevich <[email protected]>
  • Loading branch information
dkarpele committed Jan 18, 2025
1 parent 6da8b8a commit 501812c
Showing 1 changed file with 0 additions and 52 deletions.
52 changes: 0 additions & 52 deletions src/tests/system/tests/test_sssctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,58 +304,6 @@ def test_sssctl__check_invalid_section_in_name_in_snippet(client: Client):
assert "Section [invalid/local] is not allowed" in result.stdout, "Wrong error message was returned"


@pytest.mark.tools
@pytest.mark.topology(KnownTopology.Client)
def test_sssctl__check_invalid_pam_section_name(client: Client):
"""
:title: Typo in pam section name
:setup:
1. Start SSSD, so default config is autimatically created
2. Edit config file in a way that there is typo in sssd section name
:steps:
1. Call sssctl config-check
2. Check error message
:expectedresults:
1. config-check detects an error
2. Error message is properly set
:customerscenario: False
"""
client.sssd.common.local()
client.sssd.start()
conf = re.sub(".pam.", "[pamx]", client.fs.read("/etc/sssd/sssd.conf"))
client.fs.write("/etc/sssd/sssd.conf", conf, mode="600")

result = client.sssctl.config_check()
assert result.rc != 0, "Config-check did not detect misconfigured config"
assert "Section [pamx] is not allowed" in result.stdout, "Wrong error message on stdout"


@pytest.mark.tools
@pytest.mark.topology(KnownTopology.Client)
def test_sssctl__check_invalid_nss_section_name(client: Client):
"""
:title: Typo in nss section name
:setup:
1. Start SSSD, so default config is autimatically created
2. Edit config file in a way that there is typo in sssd section name
:steps:
1. Call sssctl config-check
2. Check error message
:expectedresults:
1. config-check detects an error
2. Error message is properly set
:customerscenario: False
"""
client.sssd.common.local()
client.sssd.start()
conf = re.sub(".nss.", "[nssx]", client.fs.read("/etc/sssd/sssd.conf"))
client.fs.write("/etc/sssd/sssd.conf", conf, mode="600")

result = client.sssctl.config_check()
assert result.rc != 0, "Config-check did not detect misconfigured config"
assert "Section [nssx] is not allowed" in result.stdout, "Wrong error message on stdout"


@pytest.mark.tools
@pytest.mark.topology(KnownTopology.Client)
def test_sssctl__check_invalid_permission(client: Client):
Expand Down

0 comments on commit 501812c

Please sign in to comment.