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