diff options
-rw-r--r-- | ipatests/test_integration/tasks.py | 11 | ||||
-rw-r--r-- | ipatests/test_integration/test_trust.py | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py index 4412c14f2..e7c33d0d0 100644 --- a/ipatests/test_integration/tasks.py +++ b/ipatests/test_integration/tasks.py @@ -509,6 +509,17 @@ def remove_trust_with_ad(master, ad_domain): range_name = ad_domain.upper() + '_id_range' master.run_command(['ipa', 'idrange-del', range_name]) + remove_trust_info_from_ad(master, ad_domain) + + +def remove_trust_info_from_ad(master, ad_domain): + # Remove record about trust from AD + master.run_command(['rpcclient', ad_domain, + '-U\\Administrator%{}'.format( + master.config.ad_admin_password), + '-c', 'deletetrustdom {}'.format(master.domain.name)], + raiseonerr=False) + def configure_auth_to_local_rule(master, ad): """ diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py index 6b30338cd..27c0e5620 100644 --- a/ipatests/test_integration/test_trust.py +++ b/ipatests/test_integration/test_trust.py @@ -35,6 +35,9 @@ class ADTrustBase(IntegrationTest): @classmethod def install(cls, mh): + if not cls.master.transport.file_exists('/usr/bin/rpcclient'): + raise nose.SkipTest("Package samba-client not available " + "on {}".format(cls.master.hostname)) super(ADTrustBase, cls).install(mh) cls.ad = cls.ad_domains[0].ads[0] cls.ad_domain = cls.ad.domain.name |