mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
ipatests: Test for ipahealthcheck.ds.ruv check
This test ensures that RUVCheck for ipahealthcheck.ds.ruv source displays correct result Signed-off-by: sumenon <sumenon@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Mohammad Rizwan Yusuf <myusuf@redhat.com>
This commit is contained in:
parent
1717b5b08f
commit
29fd9602c6
@ -532,6 +532,39 @@ class TestIpaHealthCheck(IntegrationTest):
|
||||
assert check["result"] == "SUCCESS"
|
||||
assert check["kw"]["key"] in SRV_RECORDS
|
||||
|
||||
def test_ipa_healthcheck_ds_ruv_check(self):
|
||||
"""
|
||||
This testcase checks that ipa-healthcheck tool with RUVCheck
|
||||
discovers the same RUV entries as the ipa-replica-manage list-ruv
|
||||
command
|
||||
"""
|
||||
result = self.master.run_command(
|
||||
[
|
||||
"ipa-replica-manage",
|
||||
"list-ruv",
|
||||
"-p",
|
||||
self.master.config.dirman_password,
|
||||
]
|
||||
)
|
||||
output = re.findall(
|
||||
r"\w+.+.\w+.\w:\d+", result.stdout_text.replace("389: ", "")
|
||||
)
|
||||
ruvs = []
|
||||
for r in output:
|
||||
(host, r) = r.split(":")
|
||||
if host == self.master.hostname:
|
||||
ruvs.append(r)
|
||||
returncode, data = run_healthcheck(
|
||||
self.master, "ipahealthcheck.ds.ruv", "RUVCheck"
|
||||
)
|
||||
assert returncode == 0
|
||||
for check in data:
|
||||
assert check["result"] == "SUCCESS"
|
||||
assert check["kw"]["key"] in (self.master.domain.basedn, "o=ipaca")
|
||||
assert check["kw"]["ruv"] in ruvs
|
||||
ruvs.remove(check["kw"]["ruv"])
|
||||
assert not ruvs
|
||||
|
||||
def test_ipa_healthcheck_output_indent(self):
|
||||
"""
|
||||
This test case checks whether default (2) indentation is applied
|
||||
|
Loading…
Reference in New Issue
Block a user