Hi,

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

-- 
Tomas Babej
Associate Software Engeneer | Red Hat | Identity Management
RHCE | Brno Site | IRC: tbabej | freeipa.org 


>From acadb5537c26b0f27065c172b7952f3e14474939 Mon Sep 17 00:00:00 2001
From: Tomas Babej <[email protected]>
Date: Thu, 27 Feb 2014 15:40:54 +0100
Subject: [PATCH] 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
---
 ipatests/test_integration/test_legacy_clients.py | 4 ++--
 ipatests/test_integration/test_trust.py          | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/ipatests/test_integration/test_legacy_clients.py b/ipatests/test_integration/test_legacy_clients.py
index d70dd101092864ac40cc799a214d8d80d9d0a273..072a2939dcc60d949a4f25b7362bbce86ef1fc4d 100644
--- a/ipatests/test_integration/test_legacy_clients.py
+++ b/ipatests/test_integration/test_legacy_clients.py
@@ -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):
diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index ec545baba2d7bd6e842b3aa52e79e68a9e1cb92a..4afc13440b0130f3a9cd6d35ac472e853af39b86 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -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
 
-- 
1.8.5.3

_______________________________________________
Freeipa-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to