ipa/0023-ipatests-test_ipahealthcheck-print-a-message-if-a-sy.patch
Florence Blanc-Renaud 6ff3da92fc ipa-4.9.6-5
- Resolves: rhbz#1988383 Do SRV discovery in ipa-getkeytab if -s and -H aren't provided
- Resolves: rhbz#1986329 ipa-server install failure without DNS
- Resolves: rhbz#1980734 Remove python3-pexpect as dependency for ipatests pkg
- Resolves: rhbz#1992538 Backport recent test fixes in python3-ipatests
2021-08-17 10:34:03 +02:00

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