Skip to content

Commit

Permalink
Tests: Update ad multiforest and multidomain suites.
Browse files Browse the repository at this point in the history
Reviewed-by: Alexey Tikhonov <[email protected]>
  • Loading branch information
jakub-vavra-cz committed May 29, 2024
1 parent 6de231d commit 979c25f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/tests/multihost/admultidomain/test_multidomain.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class TestADMultiDomain(object):

@staticmethod
def test_0001_bz2013297(self, multihost, newhostname, adchildjoin):
def test_0001_bz2013297(multihost, newhostname, adchildjoin):
"""
:title: IDM-SSSD-TC: ad_provider: forests: disabled root domain causes subdomains to be marked offline
:id: 3055d093-8449-4146-a6e1-b221dee35395
Expand Down Expand Up @@ -88,7 +88,7 @@ def test_0001_bz2013297(self, multihost, newhostname, adchildjoin):
assert getent_child_user2.returncode == 0

@staticmethod
def test_0002_bz2018432(self, multihost, newhostname, adjoin):
def test_0002_bz2018432(multihost, newhostname, adjoin):
"""
:title: IDM-SSSD-TC: ad_provider: forests: sssctl domain_list shows more domains than it should
:id: b2c9efc8-b3a6-4216-99d6-7ae1d868c43f
Expand Down Expand Up @@ -136,7 +136,7 @@ def test_0002_bz2018432(self, multihost, newhostname, adjoin):
assert domain_list == multihost_list

@staticmethod
def test_0003_bz2167728(self, multihost, newhostname, adchildjoin):
def test_0003_bz2167728(multihost, newhostname, adchildjoin):
"""
:title: IDM-SSSD-TC: ad_provider: forests: bz2167728 Auth fails if client cannot speak to forest root domain
:id: e9ba9423-0a42-4379-a900-637c79ff0e5c
Expand Down Expand Up @@ -185,9 +185,9 @@ def test_0003_bz2167728(self, multihost, newhostname, adchildjoin):
getent3 = multihost.client[0].run_command(f'getent passwd tree_user1@{tree_domain}', raiseonerr=False)

multihost.client[0].put_file_contents('/etc/krb5.conf', krb5)
multihost.client[0].run_command('chattr -i /etc/resolv.conf', raiseonerror=False)
multihost.client[0].run_command('chattr -i /etc/resolv.conf', raiseonerr=False)
multihost.client[0].put_file_contents('/etc/resolv.conf', resolv)
multihost.client[0].run_command('chattr +i /etc/resolv.conf', raiseonerror=False)
multihost.client[0].run_command('chattr +i /etc/resolv.conf', raiseonerr=False)
client.restore_sssd_conf()

assert getent1.returncode == 0, f'Could not find user1@{domain}!'
Expand Down
11 changes: 5 additions & 6 deletions src/tests/multihost/admultidomain/test_multiforest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class TestADMultiForest(object):

@staticmethod
def test_0001_multiforest(self, multihost, newhostname, adjoin):
def test_0001_multiforest(multihost, newhostname, adjoin):
"""
:title: IDM-SSSD-TC: ad_provider: admultiforest : Authentication against two forests
:id: 900f2467-1aca-430c-bbaa-b22d30a829ad
Expand All @@ -32,11 +32,11 @@ def test_0001_multiforest(self, multihost, newhostname, adjoin):
ad_domain = multihost.ad[0].domainname
ad_server = multihost.ad[0].hostname
# The second forest domain must be the last entry in the metadata file
ad1_ip = multihost.ad[len(multihost.ad)-1].ip
ad1_domain = multihost.ad[len(multihost.ad)-1].domainname
ad1_ip = multihost.ad[len(multihost.ad) - 1].ip
ad1_domain = multihost.ad[len(multihost.ad) - 1].domainname
ad1_domain_upper = str.upper(ad1_domain)
ad1_server = multihost.ad[len(multihost.ad)-1].hostname
ad1_password = multihost.ad[len(multihost.ad)-1].ssh_password
ad1_server = multihost.ad[len(multihost.ad) - 1].hostname
ad1_password = multihost.ad[len(multihost.ad) - 1].ssh_password

hosts = multihost.client[0].get_file_contents('/etc/hosts', encoding='utf-8')
hosts_new = hosts + f'{ad1_ip} {ad1_server}'
Expand Down Expand Up @@ -115,4 +115,3 @@ def test_0001_multiforest(self, multihost, newhostname, adjoin):
assert getent_domain1_user2.returncode == 0, f"Could not find user2 {getent_domain1_user2}!"
assert id_domain1_user1.returncode == 0, f"Could not find user1 {id_domain1_user1}!"
assert id_domain1_user2.returncode == 0, f"Could not find user2 {id_domain1_user2}!"

0 comments on commit 979c25f

Please sign in to comment.