mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-12 09:11:55 -06:00
ipatests: Tests to check ipahealthcheck tool with IPA-AD trust scenario
Tests for below checks are included IPATrustDomainsCheck IPATrustControllerConfCheck IPAsidgenpluginCheck IPATrustControllerServiceCheck IPATrustAgentMemberCheck IPATrustCatalogCheck Reviewed-By: Florence Blanc-Renaud <flo@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
511f5194dc
commit
769c87f5e7
@ -784,3 +784,123 @@ class TestIpaHealthCheckWithoutDNS(IntegrationTest):
|
||||
check["kw"]["key"] in DEFAULT_PKI_KRA_CERTS
|
||||
)
|
||||
tasks.uninstall_master(self.master)
|
||||
|
||||
|
||||
class TestIpaHealthCheckWithADtrust(IntegrationTest):
|
||||
"""
|
||||
Test for ipa-healthcheck tool with IPA Master with trust setup
|
||||
with AD system
|
||||
"""
|
||||
topology = "line"
|
||||
num_ad_domains = 1
|
||||
|
||||
@classmethod
|
||||
def install(cls, mh):
|
||||
tasks.install_master(cls.master, setup_dns=True)
|
||||
cls.ad = cls.ads[0]
|
||||
tasks.install_adtrust(cls.master)
|
||||
tasks.configure_dns_for_trust(cls.master, cls.ad)
|
||||
tasks.establish_trust_with_ad(cls.master, cls.ad.domain.name)
|
||||
|
||||
def test_ipahealthcheck_trust_domainscheck(self):
|
||||
"""
|
||||
This testcase checks when trust between IPA-AD is established,
|
||||
IPATrustDomainsCheck displays result as SUCCESS and also
|
||||
displays ADREALM as sssd/trust domains
|
||||
"""
|
||||
returncode, data = run_healthcheck(
|
||||
self.master, "ipahealthcheck.ipa.trust", "IPATrustDomainsCheck"
|
||||
)
|
||||
assert returncode == 0
|
||||
for check in data:
|
||||
if check["kw"]["key"] == "domain-list":
|
||||
assert check["result"] == "SUCCESS"
|
||||
assert (
|
||||
check["kw"]["sssd_domains"] == self.ad.domain.name
|
||||
and check["kw"]["trust_domains"] == self.ad.domain.name
|
||||
)
|
||||
elif check["kw"]["key"] == "domain-status":
|
||||
assert check["result"] == "SUCCESS"
|
||||
assert check["kw"]["domain"] == self.ad.domain.name
|
||||
|
||||
def test_ipahealthcheck_trust_catalogcheck(self):
|
||||
"""
|
||||
This testcase checks when trust between IPA-AD is established,
|
||||
IPATrustCatalogCheck displays result as SUCCESS and also
|
||||
domain value is displayed as ADREALM
|
||||
"""
|
||||
returncode, data = run_healthcheck(
|
||||
self.master, "ipahealthcheck.ipa.trust", "IPATrustCatalogCheck"
|
||||
)
|
||||
assert returncode == 0
|
||||
for check in data:
|
||||
if check["kw"]["key"] == "AD Global Catalog":
|
||||
assert check["result"] == "SUCCESS"
|
||||
assert check["kw"]["domain"] == self.ad.domain.name
|
||||
elif check["kw"]["key"] == "AD Domain Controller":
|
||||
assert check["result"] == "SUCCESS"
|
||||
assert check["kw"]["domain"] == self.ad.domain.name
|
||||
|
||||
def test_ipahealthcheck_trustcontoller_conf_check(self):
|
||||
"""
|
||||
This testcase checks when trust between IPA-AD is established,
|
||||
IPATrustControllerConfCheck displays result as SUCCESS and also
|
||||
displays key as 'net conf list'
|
||||
"""
|
||||
returncode, data = run_healthcheck(
|
||||
self.master,
|
||||
"ipahealthcheck.ipa.trust",
|
||||
"IPATrustControllerConfCheck",
|
||||
)
|
||||
assert returncode == 0
|
||||
for check in data:
|
||||
assert check["result"] == "SUCCESS"
|
||||
assert check["kw"]["key"] == "net conf list"
|
||||
|
||||
def test_ipahealthcheck_sidgenpluginCheck(self):
|
||||
"""
|
||||
This testcase checks when trust between IPA-AD is established,
|
||||
IPAsidgenpluginCheck displays result as SUCCESS and also
|
||||
displays key value as 'ipa-sidgen-task'
|
||||
"""
|
||||
returncode, data = run_healthcheck(
|
||||
self.master, "ipahealthcheck.ipa.trust", "IPAsidgenpluginCheck"
|
||||
)
|
||||
assert returncode == 0
|
||||
for check in data:
|
||||
assert check["result"] == "SUCCESS"
|
||||
assert (
|
||||
check["kw"]["key"] == "IPA SIDGEN"
|
||||
or check["kw"]["key"] == "ipa-sidgen-task"
|
||||
)
|
||||
|
||||
def test_ipahealthcheck_controller_service_check(self):
|
||||
"""
|
||||
This testcase checks when trust between IPA-AD is established,
|
||||
IPATrustControllerServiceCheck displays result as SUCCESS and also
|
||||
displays key value as 'ADTRUST'
|
||||
"""
|
||||
returncode, data = run_healthcheck(
|
||||
self.master,
|
||||
"ipahealthcheck.ipa.trust",
|
||||
"IPATrustControllerServiceCheck"
|
||||
)
|
||||
assert returncode == 0
|
||||
for check in data:
|
||||
assert check["result"] == "SUCCESS"
|
||||
assert check["kw"]["key"] == "ADTRUST"
|
||||
|
||||
def test_ipahealthcheck_trust_agent_member_check(self):
|
||||
"""
|
||||
This testcase checks when trust between IPA-AD is established,
|
||||
IPATrustAgentMemberCheck displays result as SUCCESS.
|
||||
"""
|
||||
returncode, data = run_healthcheck(
|
||||
self.master,
|
||||
"ipahealthcheck.ipa.trust",
|
||||
"IPATrustAgentMemberCheck"
|
||||
)
|
||||
assert returncode == 0
|
||||
for check in data:
|
||||
assert check["result"] == "SUCCESS"
|
||||
assert check["kw"]["key"] == self.master.hostname
|
||||
|
Loading…
Reference in New Issue
Block a user