From bf1d652ff946e448a5b97a12df926ae4a7d9db01 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Dec 03 2020 08:31:45 +0000 Subject: ipatests: fix TestTrust::test_subordinate_suffix The test test_subordinate_suffix is failing when configuring the DNS for the trust, because the dnsforwardzone already exists. It was configured during the previous test for nonposix trust. At the end of the tests for nonposix trust, unconfigure the DNS and the trust before calling the subordinate_suffix test, and add a test cleaning up subordinate_suffix test. Fixes: https://pagure.io/freeipa/issue/8601 Reviewed-By: Alexander Bokovoy --- diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py index 31349ce..86cdcd1 100644 --- a/ipatests/test_integration/test_trust.py +++ b/ipatests/test_integration/test_trust.py @@ -245,6 +245,11 @@ class TestTrust(BaseTestTrust): self.master.run_command(['kinit', '-C', '-E', self.upn_principal], stdin_text=self.upn_password) + def test_remove_nonposix_trust(self): + self.remove_trust(self.ad) + tasks.unconfigure_dns_for_trust(self.master, self.ad) + + # Test with AD trust defining subordinate suffixes def test_subordinate_suffix(self): """Test subordinate UPN Suffixes""" tasks.configure_dns_for_trust(self.master, self.ad) @@ -290,7 +295,7 @@ class TestTrust(BaseTestTrust): ) tasks.kdestroy_all(self.master) - def test_remove_nonposix_trust(self): + def test_remove_subordinate_suffixes_trust(self): self.remove_trust(self.ad) tasks.unconfigure_dns_for_trust(self.master, self.ad)