mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
parent
7fc8d241b2
commit
f9ebd47f93
@ -80,8 +80,12 @@ class TestBasicADTrust(ADTrustBase):
|
|||||||
range_name = self.ad.domain.name.upper() + '_id_range'
|
range_name = self.ad.domain.name.upper() + '_id_range'
|
||||||
result = self.master.run_command(['ipa', 'idrange-show', range_name,
|
result = self.master.run_command(['ipa', 'idrange-show', range_name,
|
||||||
'--all', '--raw'])
|
'--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):
|
def test_user_gid_uid_resolution_in_nonposix_trust(self):
|
||||||
"""Check that user has SID-generated UID"""
|
"""Check that user has SID-generated UID"""
|
||||||
@ -120,8 +124,11 @@ class TestPosixADTrust(ADTrustBase):
|
|||||||
'--all', '--raw'])
|
'--all', '--raw'])
|
||||||
|
|
||||||
# Check the range type and size
|
# Check the range type and size
|
||||||
assert " ipaRangeType: ipa-ad-trust-posix" in result.stdout_text
|
iparangetype_regex = r'ipaRangeType: ipa-ad-trust-posix'
|
||||||
assert " ipaIDRangeSize: 200000" in result.stdout_text
|
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):
|
def test_user_uid_gid_resolution_in_posix_trust(self):
|
||||||
# Check that user has AD-defined UID
|
# Check that user has AD-defined UID
|
||||||
|
Loading…
Reference in New Issue
Block a user