URL: https://github.com/freeipa/freeipa/pull/6030 Author: flo-renaud Title: #6030: ipatests: update expected error message for openssl verify Action: opened
PR body: """ The test TestIpaHealthCheckWithExternalCA::test_ipahealthcheck_ipaopensslchainvalidation needs to be adapted with the new error message returned by openssl verify when the provided certificate file does not exist. The message changed with openssl3. Fixes: https://pagure.io/freeipa/issue/8999 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/6030/head:pr6030 git checkout pr6030
From 58194d78045ee2fe6e71d32e2c68199536d30046 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud <f...@redhat.com> Date: Mon, 27 Sep 2021 18:38:41 +0200 Subject: [PATCH 1/2] ipatests: update expected error message for openssl verify The test TestIpaHealthCheckWithExternalCA::test_ipahealthcheck_ipaopensslchainvalidation needs to be adapted with the new error message returned by openssl verify when the provided certificate file does not exist. The message changed with openssl3. Fixes: https://pagure.io/freeipa/issue/8999 --- ipatests/test_integration/test_ipahealthcheck.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ipatests/test_integration/test_ipahealthcheck.py b/ipatests/test_integration/test_ipahealthcheck.py index 089793a2fa6..99f529b10fc 100644 --- a/ipatests/test_integration/test_ipahealthcheck.py +++ b/ipatests/test_integration/test_ipahealthcheck.py @@ -2415,7 +2415,10 @@ def test_ipahealthcheck_ipaopensslchainvalidation(self, rename_httpd_cert): """ Test for IPAOpenSSLChainValidation when httpd cert is moved. """ - error_msg = "Can't open {} for reading".format(paths.HTTPD_CERT_FILE) + error_msg1 = "Can't open {} for reading".format(paths.HTTPD_CERT_FILE) + # OpenSSL3 has a different error message + error_msg3 = "Could not open file or uri for loading certificate " \ + "file from {}".format(paths.HTTPD_CERT_FILE) returncode, data = run_healthcheck( self.master, "ipahealthcheck.ipa.certs", @@ -2425,7 +2428,8 @@ def test_ipahealthcheck_ipaopensslchainvalidation(self, rename_httpd_cert): for check in data: if check["kw"]["key"] == paths.HTTPD_CERT_FILE: assert check["result"] == "ERROR" - assert error_msg in check["kw"]["reason"] + assert (error_msg1 in check["kw"]["reason"] + or error_msg3 in check["kw"]["reason"]) @pytest.fixture() def replace_ipa_chain(self): From 38670e38eb5bb7292c0921630a529459650f5f05 Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud <f...@redhat.com> Date: Mon, 27 Sep 2021 18:42:59 +0200 Subject: [PATCH 2/2] Temp commit --- .freeipa-pr-ci.yaml | 2 +- ipatests/prci_definitions/temp_commit.yaml | 36 +++++++++++++++++++--- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/.freeipa-pr-ci.yaml b/.freeipa-pr-ci.yaml index abcf8c5b634..80656690080 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 4b0398b9218..c8093db43a2 100644 --- a/ipatests/prci_definitions/temp_commit.yaml +++ b/ipatests/prci_definitions/temp_commit.yaml @@ -61,14 +61,42 @@ jobs: timeout: 1800 topology: *build - fedora-latest/temp_commit: + fedora-latest/test_ipahealthcheck_nodns_extca_file: requires: [fedora-latest/build] priority: 50 job: class: RunPytest args: build_url: '{fedora-latest/build_url}' - test_suite: test_integration/test_REPLACEME.py + test_suite: test_integration/test_ipahealthcheck.py::TestIpaHealthCheckWithoutDNS test_integration/test_ipahealthcheck.py::TestIpaHealthCheckWithExternalCA test_integration/test_ipahealthcheck.py::TestIpaHealthCheckFileCheck template: *ci-master-latest - timeout: 3600 - topology: *master_1repl_1client + timeout: 5400 + topology: *master_1repl + + fedora-rawhide/build: + requires: [] + priority: 100 + job: + class: Build + args: + git_repo: '{git_repo}' + git_refspec: '{git_refspec}' + template: &ci-master-frawhide + name: freeipa/ci-master-frawhide + version: 0.4.2 + timeout: 1800 + topology: *build + + fedora-rawhide/test_ipahealthcheck_nodns_extca_file: + requires: [fedora-rawhide/build] + priority: 50 + job: + class: RunPytest + args: + build_url: '{fedora-rawhide/build_url}' + update_packages: True + test_suite: test_integration/test_ipahealthcheck.py::TestIpaHealthCheckWithoutDNS test_integration/test_ipahealthcheck.py::TestIpaHealthCheckWithExternalCA test_integration/test_ipahealthcheck.py::TestIpaHealthCheckFileCheck + template: *ci-master-frawhide + timeout: 5400 + topology: *master_1repl +
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure