Fixed incorrect domainlevel determination in tests

https://fedorahosted.org/freeipa/ticket/6167

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Oleg Fayans 2016-08-04 09:22:31 +02:00 committed by Martin Basti
parent d8fe5863d2
commit bd5746c538

View File

@ -301,6 +301,7 @@ def get_replica_filename(replica):
def domainlevel(host):
# Dynamically determines the domainlevel on master. Needed for scenarios
# when domainlevel is changed during the test execution.
kinit_admin(host)
result = host.run_command(['ipa', 'domainlevel-get'], raiseonerr=False)
level = 0
domlevel_re = re.compile('.*(\d)')