mirielka's pull request #43: "Tests: Fix regex errors in integration trust 
tests" was synchronize

See the full pull-request at https://github.com/freeipa/freeipa/pull/43
... or pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/43/head:pr43
git checkout pr43
From 313aa2b2ec7af4e3ee232de75ed99bc0795f834a Mon Sep 17 00:00:00 2001
From: Lenka Doudova <ldoud...@redhat.com>
Date: Wed, 31 Aug 2016 16:57:12 +0200
Subject: [PATCH] Tests: Fix regex errors in integration trust tests

In integration trust tests some values are checked using regular expressions.
Some of these expressions from recently added coverage have minor mistakes
which causes the comparisons to fail. Providing fix for these regular
expressions.

https://fedorahosted.org/freeipa/ticket/6285
---
 ipatests/test_integration/test_trust.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index d0b8e58..69418dc 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -298,8 +298,8 @@ def test_user_gid_uid_resolution_in_nonposix_trust(self):
         testuser = 'subdomaintestuser@{0}'.format(self.ad_subdomain)
         result = self.master.run_command(['getent', 'passwd', testuser])
 
-        testuser_regex = ("^subdomaintestuser@{0}:\*:(?!10042)(\d+):"
-                          "(?!)10047(\d+):Subdomain TestUser:"
+        testuser_regex = ("^subdomaintestuser@{0}:\*:(?!10142)(\d+):"
+                          "(?!10147)(\d+):Subdomaintest User:"
                           "/home/{1}/subdomaintestuser:/bin/sh$".format(
                               re.escape(self.ad_subdomain),
                               re.escape(self.ad_subdomain)))
@@ -393,8 +393,9 @@ def test_upn_user_resolution_in_nonposix_trust(self):
                                           self.upn_principal])
 
         # result will contain AD domain, not UPN
-        upnuser_regex = "^{}@{}:\*:(\d+):(\d+):{}:/:$".format(
-            self.upn_username, self.ad_domain, self.upn_name)
+        upnuser_regex = "^{}@{}:\*:(\d+):(\d+):{}:/home/{}/{}:/bin/sh$".format(
+            self.upn_username, self.ad_domain, self.upn_name,
+            self.ad_domain, self.upn_username)
         assert re.search(upnuser_regex, result.stdout_text)
 
     def test_upn_user_authentication(self):
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to