From 68031108ffdd7cfeef5044790b0610cef6e816b9 Mon Sep 17 00:00:00 2001
From: Sudhir Menon <sumenon@redhat.com>
Date: Thu, 3 Sep 2020 13:39:16 +0530
Subject: [PATCH 1/2] ipatests: Fix for ipahealthcheck tests

The patch fixes the below tests in TestIpaHealthCheck
- test_replication_check_exists
  Corrected the check name to ReplicationConflictCheck from ReplicationCheck
- test_ipa_healthcheck_revocation
  Modified the expected error_msg to 'Certificate is revoked, unspecified'
- test_run_with_stopped_master
  Corrected source name to ipahealthcheck.meta.services
- test_chainexpiration_check_without_cert
  fixed the assert statement
- test_ipacertnsstrust_check
  fixed the assert statement

Signed-off-by: Sudhir Menon <sumenon@redhat.com>
---
 .../test_integration/test_ipahealthcheck.py    | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/ipatests/test_integration/test_ipahealthcheck.py b/ipatests/test_integration/test_ipahealthcheck.py
index 093ff02dd7..691e3fa293 100644
--- a/ipatests/test_integration/test_ipahealthcheck.py
+++ b/ipatests/test_integration/test_ipahealthcheck.py
@@ -102,7 +102,7 @@
 ipafiles_checks = ["IPAFileNSSDBCheck", "IPAFileCheck", "TomcatFileCheck"]
 dogtag_checks = ["DogtagCertsConfigCheck", "DogtagCertsConnectivityCheck"]
 iparoles_checks = ["IPACRLManagerCheck", "IPARenewalMasterCheck"]
-replication_checks = ["ReplicationCheck"]
+replication_checks = ["ReplicationConflictCheck"]
 ruv_checks = ["RUVCheck"]
 dna_checks = ["IPADNARangeCheck"]
 idns_checks = ["IPADNSSystemRecordsCheck"]
@@ -661,7 +661,7 @@ def test_ipa_healthcheck_revocation(self):
         Ensure that healthcheck reports when IPA certs are revoked.
         """
         error_msg = (
-            "Certificate tracked by {key} is revoked {revocation_reason}"
+            "Certificate is revoked, unspecified"
         )
 
         result = self.master.run_command(
@@ -737,7 +737,7 @@ def test_run_with_stopped_master(self, ipactl):
         """
         returncode, output = run_healthcheck(
             self.master,
-            "ipahealthcheck.meta",
+            "ipahealthcheck.meta.services",
             output_type="human",
             failures_only=True)
         assert returncode == 1
@@ -762,12 +762,8 @@ def test_chainexpiration_check_without_cert(self, move_ipa_ca_crt):
         Testcase checks that ERROR message is displayed
         when ipa ca crt file is not renamed
         """
-        error_text = (
-            "[Errno 2] No such file or directory: '{}'"
-            .format(paths.IPA_CA_CRT)
-        )
         msg_text = (
-            "Error opening IPA CA chain at {key}: {error}"
+            "Error opening IPA CA chain at '{}'".format(paths.IPA_CA_CRT)
         )
         returncode, data = run_healthcheck(
             self.master,
@@ -779,7 +775,7 @@ def test_chainexpiration_check_without_cert(self, move_ipa_ca_crt):
             assert check["result"] == "ERROR"
             assert check["kw"]["key"] == paths.IPA_CA_CRT
             assert check["kw"]["error"] == error_text
-            assert check["kw"]["msg"] == msg_text
+            assert msg_text in check["kw"]["msg"]
 
     @pytest.fixture
     def modify_cert_trust_attr(self):
@@ -815,8 +811,8 @@ def test_ipacertnsstrust_check(self, modify_cert_trust_attr):
         for Server-Cert
         """
         error_msg = (
-            "Incorrect NSS trust for {nickname} in {dbdir}. "
-            "Got {got} expected {expected}."
+            "Incorrect NSS trust for Server-Cert cert-pki-ca. "
+            "Got CTu,u,u expected u,u,u"
         )
         returncode, data = run_healthcheck(
             self.master, "ipahealthcheck.ipa.certs", "IPACertNSSTrust",

From 0e1c7bb6ee86358d0b141804cf18eff09a258ff3 Mon Sep 17 00:00:00 2001
From: Sudhir Menon <sumenon@redhat.com>
Date: Thu, 3 Sep 2020 13:40:59 +0530
Subject: [PATCH 2/2] Temp Commit

Signed-off-by: Sudhir Menon <sumenon@redhat.com>
---
 .freeipa-pr-ci.yaml                        | 2 +-
 ipatests/prci_definitions/temp_commit.yaml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.freeipa-pr-ci.yaml b/.freeipa-pr-ci.yaml
index abcf8c5b63..8065669008 120000
--- a/.freeipa-pr-ci.yaml
+++ b/.freeipa-pr-ci.yaml
@@ -1 +1 @@
-ipatests/prci_definitions/gating.yaml
\ No newline at end of file
+ipatests/prci_definitions/temp_commit.yaml
\ No newline at end of file
diff --git a/ipatests/prci_definitions/temp_commit.yaml b/ipatests/prci_definitions/temp_commit.yaml
index 8f6b161fc7..9f7b42e3cc 100644
--- a/ipatests/prci_definitions/temp_commit.yaml
+++ b/ipatests/prci_definitions/temp_commit.yaml
@@ -68,7 +68,7 @@ jobs:
       class: RunPytest
       args:
         build_url: '{fedora-latest-ipa-4-8/build_url}'
-        test_suite: test_integration/test_REPLACEME.py
+        test_suite: test_integration/test_ipahealthcheck.py::TestIpaHealthCheck
         template: *ci-ipa-4-8-latest
         timeout: 3600
         topology: *master_1repl_1client
