ipatests: use AD domain name from config instead of hardcoded value

The test fails when test config contains AD domain value other than one
hardcoded in the test code.

Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
Sergey Orlov 2021-10-25 16:13:15 +02:00
parent d6d413628b
commit f1922fe501
No known key found for this signature in database
GPG Key ID: ADF8C90EDD04503D

View File

@ -944,12 +944,12 @@ class TestTrust(BaseTestTrust):
['chown', '--reference', paths.NAMED_CONF, ad_zone_file])
named_conf = self.master.get_file_contents(paths.NAMED_CONF,
encoding='utf-8')
named_conf += textwrap.dedent('''
zone "ad.test" {{
named_conf += textwrap.dedent(f'''
zone "{self.ad.domain.name}" {{
type master;
file "{}";
file "{ad_zone_file}";
}};
'''.format(ad_zone_file))
''')
self.master.put_file_contents(paths.NAMED_CONF, named_conf)
tasks.restart_named(self.master)
try: