From bb38fbca911276b2486120a46d1cd75f4e358ef9 Mon Sep 17 00:00:00 2001 From: Mohammad Rizwan Date: Mon, 2 Aug 2021 19:26:28 +0530 Subject: [PATCH] ipatests: Look for warning into stderr instead of stdout In https://github.com/freeipa/freeipa/pull/5855 was looking into stdout_text for warning instead of stderr_text, hence was failing for pki version > 10.11.0. related: https://pagure.io/freeipa/issue/8890 Signed-off-by: Mohammad Rizwan Reviewed-By: Florence Blanc-Renaud --- ipatests/test_integration/test_ipa_cert_fix.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ipatests/test_integration/test_ipa_cert_fix.py b/ipatests/test_integration/test_ipa_cert_fix.py index 1b9dbd818..d100316c1 100644 --- a/ipatests/test_integration/test_ipa_cert_fix.py +++ b/ipatests/test_integration/test_ipa_cert_fix.py @@ -232,16 +232,14 @@ class TestIpaCertFix(IntegrationTest): # check that pki-server cert-fix command fails err_msg2 = ("ERROR: CalledProcessError(Command " "['pki-server', 'cert-fix'") - warn_msg = ("WARNING: No selftests configured in " - f"{paths.CA_CS_CFG_PATH} " - "(selftests.container.order.startup)") + warn_msg = "WARNING: No selftests configured in" if (tasks.get_pki_version(self.master) < tasks.parse_version('10.11.0')): assert (err_msg1 in result.stderr_text and err_msg2 in result.stderr_text) else: - assert warn_msg in result.stdout_text + assert warn_msg in result.stderr_text def test_expired_CA_cert(self, expire_ca_cert): """Test to check ipa-cert-fix when CA certificate is expired