53 lines
1.9 KiB
Diff
53 lines
1.9 KiB
Diff
|
From 7f910eb2dda8595da435b4aed6e759a2916df813 Mon Sep 17 00:00:00 2001
|
||
|
From: Michal Polovka <mpolovka@redhat.com>
|
||
|
Date: Wed, 23 Jun 2021 14:53:49 +0200
|
||
|
Subject: [PATCH] ipatests: test_ipahealthcheck: print a message if a system is
|
||
|
healthy
|
||
|
|
||
|
Test if when the system is completely healthy, informative message is
|
||
|
returned and not only empty output (list or json).
|
||
|
|
||
|
Related: https://pagure.io/freeipa/issue/8892
|
||
|
|
||
|
Signed-off-by: Michal Polovka <mpolovka@redhat.com>
|
||
|
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
|
||
|
---
|
||
|
ipatests/test_integration/test_ipahealthcheck.py | 14 +++++++++++++-
|
||
|
1 file changed, 13 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/ipatests/test_integration/test_ipahealthcheck.py b/ipatests/test_integration/test_ipahealthcheck.py
|
||
|
index f6a3043f1..36fe72be7 100644
|
||
|
--- a/ipatests/test_integration/test_ipahealthcheck.py
|
||
|
+++ b/ipatests/test_integration/test_ipahealthcheck.py
|
||
|
@@ -286,7 +286,7 @@ class TestIpaHealthCheck(IntegrationTest):
|
||
|
for source in sources_avail:
|
||
|
assert source in result.stdout_text
|
||
|
|
||
|
- def test_human_output(self, restart_service):
|
||
|
+ def test_human_severity(self, restart_service):
|
||
|
"""
|
||
|
Test that in human output the severity value is correct
|
||
|
|
||
|
@@ -306,6 +306,18 @@ class TestIpaHealthCheck(IntegrationTest):
|
||
|
assert output == \
|
||
|
"ERROR: ipahealthcheck.meta.services.sssd: sssd: not running"
|
||
|
|
||
|
+ def test_human_output(self):
|
||
|
+ """
|
||
|
+ Test if in case no failures were found, informative string is printed
|
||
|
+ in human output.
|
||
|
+
|
||
|
+ https://pagure.io/freeipa/issue/8892
|
||
|
+ """
|
||
|
+ returncode, output = run_healthcheck(self.master, output_type="human",
|
||
|
+ failures_only=True)
|
||
|
+ assert returncode == 0
|
||
|
+ assert output == "No issues found."
|
||
|
+
|
||
|
def test_ipa_healthcheck_after_certupdate(self):
|
||
|
"""
|
||
|
Verify that ipa-certupdate hasn't messed up tracking
|
||
|
--
|
||
|
2.31.1
|
||
|
|