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

PR body:
"""
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
"""

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 f1a63a08b5b4d1c5f1ac31f1b184f0498fb87dc9 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 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index d0b8e58..93bba61 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -299,7 +299,7 @@ def test_user_gid_uid_resolution_in_nonposix_trust(self):
         result = self.master.run_command(['getent', 'passwd', testuser])
 
         testuser_regex = ("^subdomaintestuser@{0}:\*:(?!10042)(\d+):"
-                          "(?!)10047(\d+):Subdomain TestUser:"
+                          "(?!10047)(\d+):Subdomain TestUser:"
                           "/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/{}/{}:$".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