ipatests: test_trust: Change expected home directories for posix users

Information from the AD about the home directories is not leveraged at
all, but is generated from the username and domain. Fix the assumptions
in the tests.

Also changes 'Subdomain Test User' to 'Subdomaintest User' to be more
consistent.

https://fedorahosted.org/freeipa/ticket/4184

Reviewed-By: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Tomas Babej
2014-02-27 15:40:54 +01:00
committed by Martin Kosek
parent 20c716ec9a
commit 8c8cc8b614
2 changed files with 5 additions and 4 deletions

View File

@@ -248,7 +248,7 @@ class BaseTestLegacyClient(object):
result = self.legacy_client.run_command(['getent', 'passwd', testuser])
testuser_regex = "subdomaintestuser@%s:\*:%s:%s:"\
"Subdomain Test User:%s:"\
"Subdomaintest User:%s:"\
"/bin/sh"\
% (re.escape(self.ad_subdomain),
self.subdomain_testuser_uid_regex,
@@ -405,7 +405,7 @@ class BaseTestLegacyClientPosix(BaseTestLegacyClient,
testuser_gid_regex = '10047'
subdomain_testuser_uid_regex = '10142'
subdomain_testuser_gid_regex = '10147'
homedir_template = "/home/{username}"
homedir_template = "/home/{domain}/{username}"
posix_trust = True
def test_remove_trust_with_posix_attributes(self):

View File

@@ -131,8 +131,9 @@ class TestPosixADTrust(ADTrustBase):
result = self.master.run_command(['getent', 'passwd', testuser])
testuser_stdout = "testuser@%s:*:10042:10047:"\
"Test User:/home/testuser:/bin/sh"\
% self.ad.domain.name
"Test User:/home/%s/testuser:/bin/sh"\
% (self.ad.domain.name,
self.ad.domain.name)
assert testuser_stdout in result.stdout_text