Skip to content

Commit

Permalink
Tests: Drop files provider from tests test_sssctl_ldap.py
Browse files Browse the repository at this point in the history
Review if any of "multihost tests" depend on "files provider".
Remove found dependencies.
  • Loading branch information
aborah-sudo committed Feb 19, 2024
1 parent 32b72c7 commit 7f225ca
Showing 1 changed file with 31 additions and 19 deletions.
50 changes: 31 additions & 19 deletions src/tests/multihost/alltests/test_sssctl_ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,13 @@ def test_0003_bz1638295(self, multihost,
tools = sssdTools(multihost.client[0])
multihost.client[0].service_sssd('stop')
tools.remove_sss_cache('/var/lib/sss/db')
tools.sssd_conf("sssd", {'services': 'nss, pam, ifp',
'enable_files_domain': 'true'},
action='update')
sssd_param = {'domains': 'local'}
tools.sssd_conf('sssd', sssd_param)
param = {'id_provider': 'proxy',
'proxy_lib_name': 'files',
'proxy_pam_target': 'sssd-shadowutils'}
tools.sssd_conf('domain/local', param)
tools.sssd_conf("sssd", {'services': 'nss, pam, ifp'}, action='update')
domain_params = {'allowed_uids': 'root, user5000',
'user_attributes': '-name, -uidNumber'}
tools.sssd_conf("ifp", domain_params)
Expand Down Expand Up @@ -120,9 +124,13 @@ def test_0004_bz1638295(self, multihost,
tools = sssdTools(multihost.client[0])
multihost.client[0].service_sssd('stop')
tools.remove_sss_cache('/var/lib/sss/db')
tools.sssd_conf("sssd", {'services': 'nss, pam, ifp',
'enable_files_domain': 'true'},
action='update')
sssd_param = {'domains': 'local'}
tools.sssd_conf('sssd', sssd_param)
param = {'id_provider': 'proxy',
'proxy_lib_name': 'files',
'proxy_pam_target': 'sssd-shadowutils'}
tools.sssd_conf('domain/local', param)
tools.sssd_conf("sssd", {'services': 'nss, pam, ifp'}, action='update')
domain_params = {'allowed_uids': '0, 5000',
'user_attributes': '-name, -uidNumber'}
tools.sssd_conf("ifp", domain_params)
Expand Down Expand Up @@ -150,9 +158,13 @@ def test_0005_bz1638295(self, multihost,
tools = sssdTools(multihost.client[0])
multihost.client[0].service_sssd('stop')
tools.remove_sss_cache('/var/lib/sss/db')
tools.sssd_conf("sssd", {'services': 'nss, pam, ifp',
'enable_files_domain': 'true'},
action='update')
sssd_param = {'domains': 'local'}
tools.sssd_conf('sssd', sssd_param)
param = {'id_provider': 'proxy',
'proxy_lib_name': 'files',
'proxy_pam_target': 'sssd-shadowutils'}
tools.sssd_conf('domain/local', param)
tools.sssd_conf("sssd", {'services': 'nss, pam, ifp'}, action='update')
domain_params = {'allowed_uids': '5000',
'user_attributes': '-name, -uidNumber'}
tools.sssd_conf("ifp", domain_params)
Expand All @@ -176,19 +188,15 @@ def test_0006_bz1638295(self, multihost, backupsssdconf):
multihost.client[0].run_command("useradd foo1", raiseonerr=False)
multihost.client[0].service_sssd('stop')
tools.remove_sss_cache('/var/lib/sss/db')
tools.sssd_conf("sssd", {'services': 'nss, pam, ifp',
'enable_files_domain': 'true'},
action='update')
tools.sssd_conf("sssd", {'services': 'nss, pam, ifp'}, action='update')
domain_params = {'allowed_uids': '0, foo1',
'user_attributes': '+mail, -gecos'}
tools.sssd_conf("ifp", domain_params)
multihost.client[0].service_sssd('start')
sssctl_cmd = 'sssctl user-checks foo1@%s' % ds_instance_name
cmd = multihost.client[0].run_command(sssctl_cmd,
raiseonerr=False)
cmd = multihost.client[0].run_command(sssctl_cmd, raiseonerr=False)
assert cmd.returncode == 0
checks = ['SSSD InfoPipe user lookup', 'gecos: not set',
'mail: [email protected]']
checks = ['SSSD InfoPipe user lookup', 'gecos: not set', 'mail: [email protected]']
for _ in checks:
find = re.compile(r'%s' % _)
result = find.search(cmd.stdout_text)
Expand All @@ -208,9 +216,13 @@ def test_0007_bz1638295(self, multihost,
tools = sssdTools(multihost.client[0])
multihost.client[0].service_sssd('stop')
tools.remove_sss_cache('/var/lib/sss/db')
tools.sssd_conf("sssd", {'services': 'nss, pam, ifp',
'enable_files_domain': 'true'},
action='update')
sssd_param = {'domains': 'local'}
tools.sssd_conf('sssd', sssd_param)
param = {'id_provider': 'proxy',
'proxy_lib_name': 'files',
'proxy_pam_target': 'sssd-shadowutils'}
tools.sssd_conf('domain/local', param)
tools.sssd_conf("sssd", {'services': 'nss, pam, ifp'}, action='update')
domain_params = {'allowed_uids': 'root, 5000',
'user_attributes': '-name, -uidNumber'}
tools.sssd_conf("ifp", domain_params)
Expand Down

0 comments on commit 7f225ca

Please sign in to comment.