From f1922fe5017a1e342af7500d875d9a238a48570c Mon Sep 17 00:00:00 2001 From: Sergey Orlov Date: Mon, 25 Oct 2021 16:13:15 +0200 Subject: [PATCH] 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 --- ipatests/test_integration/test_trust.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py index a58e27af0..0634badbb 100644 --- a/ipatests/test_integration/test_trust.py +++ b/ipatests/test_integration/test_trust.py @@ -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: