From 6ca119686aadfa72c0474f72758b63cd671952d4 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Feb 01 2023 16:47:26 +0000 Subject: tests: Add new ipa-ca error messages to IPADNSSystemRecordsCheck freeipa-healthcheck changed some messages related to ipa-ca DNS record validation in IPADNSSystemRecordsCheck. Include support for it and retain backwards compatibility. Fixes: https://pagure.io/freeipa/issue/9291 Signed-off-by: Rob Crittenden Reviewed-By: Florence Blanc-Renaud --- diff --git a/ipatests/test_integration/test_ipahealthcheck.py b/ipatests/test_integration/test_ipahealthcheck.py index 94b0db0..47f64f2 100644 --- a/ipatests/test_integration/test_ipahealthcheck.py +++ b/ipatests/test_integration/test_ipahealthcheck.py @@ -1614,12 +1614,21 @@ class TestIpaHealthCheckWithoutDNS(IntegrationTest): Test checks the result of IPADNSSystemRecordsCheck when ipa-server is configured without DNS. """ - expected_msgs = { - "Expected SRV record missing", - "Got {count} ipa-ca A records, expected {expected}", - "Got {count} ipa-ca AAAA records, expected {expected}", - "Expected URI record missing", - } + version = tasks.get_healthcheck_version(self.master) + if (parse_version(version) < parse_version('0.12')): + expected_msgs = { + "Expected SRV record missing", + "Got {count} ipa-ca A records, expected {expected}", + "Got {count} ipa-ca AAAA records, expected {expected}", + "Expected URI record missing", + } + else: + expected_msgs = { + "Expected SRV record missing", + "Unexpected ipa-ca address {ipaddr}", + "expected ipa-ca to contain {ipaddr} for {server}", + "Expected URI record missing", + } tasks.install_packages(self.master, HEALTHCHECK_PKG) returncode, data = run_healthcheck(