summaryrefslogtreecommitdiffstats
path: root/ipatests
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2014-03-26 12:34:55 +0100
committerMartin Kosek <mkosek@redhat.com>2014-03-26 12:57:29 +0100
commitf9ebd47f9367e1c66337deec4fa258fa8d2e3e12 (patch)
tree68b8f854f193af5f67a17c66c526bd4ac7661f06 /ipatests
parent7fc8d241b2df352adbc51616ae3eb5dc4199a75e (diff)
downloadfreeipa-f9ebd47f9367e1c66337deec4fa258fa8d2e3e12.tar.gz
freeipa-f9ebd47f9367e1c66337deec4fa258fa8d2e3e12.tar.xz
freeipa-f9ebd47f9367e1c66337deec4fa258fa8d2e3e12.zip
ipatests: Do not depend on the case of the attributes when testing ID ranges
In test_trust.py, several tests did case sensitive search on the output of the ipa idrange-show command. This could cause false negatives. Part of: https://fedorahosted.org/freeipa/ticket/4267 Reviewed-By: Martin Kosek <mkosek@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r--ipatests/test_integration/test_trust.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index 4afc13440..95e48dd9c 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -80,8 +80,12 @@ class TestBasicADTrust(ADTrustBase):
range_name = self.ad.domain.name.upper() + '_id_range'
result = self.master.run_command(['ipa', 'idrange-show', range_name,
'--all', '--raw'])
- assert " ipaRangeType: ipa-ad-trust" in result.stdout_text
- assert " ipaIDRangeSize: 200000" in result.stdout_text
+
+ iparangetype_regex = r'ipaRangeType: ipa-ad-trust'
+ iparangesize_regex = r'ipaIDRangeSize: 200000'
+
+ assert re.search(iparangetype_regex, result.stdout_text, re.IGNORECASE)
+ assert re.search(iparangesize_regex, result.stdout_text, re.IGNORECASE)
def test_user_gid_uid_resolution_in_nonposix_trust(self):
"""Check that user has SID-generated UID"""
@@ -120,8 +124,11 @@ class TestPosixADTrust(ADTrustBase):
'--all', '--raw'])
# Check the range type and size
- assert " ipaRangeType: ipa-ad-trust-posix" in result.stdout_text
- assert " ipaIDRangeSize: 200000" in result.stdout_text
+ iparangetype_regex = r'ipaRangeType: ipa-ad-trust-posix'
+ iparangesize_regex = r'ipaIDRangeSize: 200000'
+
+ assert re.search(iparangetype_regex, result.stdout_text, re.IGNORECASE)
+ assert re.search(iparangesize_regex, result.stdout_text, re.IGNORECASE)
def test_user_uid_gid_resolution_in_posix_trust(self):
# Check that user has AD-defined UID