Skip to content

Commit

Permalink
Tests: adjoin in test_00015_authselect_cannot_validate_its_own_files
Browse files Browse the repository at this point in the history
Switch test_00015_authselect_cannot_validate_its_own_files to use adjoin
fixture instead of joining manually.

Reviewed-by: Shridhar Gadekar <[email protected]>
  • Loading branch information
jakub-vavra-cz committed Oct 16, 2023
1 parent 421a818 commit 4a9f8eb
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/tests/multihost/ad/test_adparameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,15 @@ def test_0003_bz1421622(self, multihost, adjoin, create_aduser_group):
assert False

@pytest.mark.tier1
def test_00015_authselect_cannot_validate_its_own_files(self, multihost):
def test_00015_authselect_cannot_validate_its_own_files(self, multihost, adjoin):
"""
:title: authselect: authselect cannot validate its own files
:id: 67bec814-d67b-4469-9662-58354889d549
:requirement: IDM-SSSD-REQ :: Authselect replaced authconfig
:casecomponent: authselect
:bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1734302
"""
password = multihost.ad[0].ssh_password
client = sssdTools(multihost.client[0])
domainname = multihost.ad[0].domainname.strip().upper()
client.realm_join(domainname, password)
adjoin(membersw='adcli')
multihost.client[0].run_command("service sssd restart")
multihost.client[0].run_command("yum install -y gdb")
multihost.client[0].run_command("gdb -quiet authselect -ex "
Expand All @@ -156,12 +153,7 @@ def test_00015_authselect_cannot_validate_its_own_files(self, multihost):
"'shell sleep 1' -ex 'detach' -ex "
"'quit'")
cmd_check = multihost.client[0].run_command("authselect check")
client.realm_leave(domainname)
if "Current configuration is valid." in cmd_check.stdout_text:
result = "PASS"
else:
result = "FAIL"
assert result == "PASS"
assert "Current configuration is valid." in cmd_check.stdout_text

@pytest.mark.tier1
def test_0005_BZ1527149_BZ1549675(self, multihost, adjoin, create_adgrp):
Expand Down

0 comments on commit 4a9f8eb

Please sign in to comment.