mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Tests: Provide AD cleanup for trust tests
Providing cleanup of trust information from AD machines for trusts tests. https://fedorahosted.org/freeipa/ticket/6396 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
committed by
Martin Babinsky
parent
a22a5dd676
commit
8a177732af
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user