From 2e5af507781b192142b179557f25655e37227e33 Mon Sep 17 00:00:00 2001 From: Nick Burgan-Illig Date: Tue, 16 Jul 2024 19:10:45 +0000 Subject: [PATCH] (PE-38293) Fix test for modified error message with new Bouncy Castle --- .../request_handler/request_handler_core_test.clj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/unit/puppetlabs/services/request_handler/request_handler_core_test.clj b/test/unit/puppetlabs/services/request_handler/request_handler_core_test.clj index 8f189402a..2d3c9ce83 100644 --- a/test/unit/puppetlabs/services/request_handler/request_handler_core_test.clj +++ b/test/unit/puppetlabs/services/request_handler/request_handler_core_test.clj @@ -272,9 +272,11 @@ (:msg %))) (jruby-request-with-client-cert-header "%1Q%2")))) (testing "Bad certificate content" - (is (thrown+? [:kind :bad-request - :msg (str "Unable to parse x-client-cert into " - "certificate: -----END CERTIFICATE not found")] + (is (thrown+? #(and + (= (:kind %) :bad-request) + (re-matches + #"Unable to parse x-client-cert into certificate: -----END CERTIFICATE(-----)? not found" + (:msg %))) (jruby-request-with-client-cert-header "-----BEGIN%20CERTIFICATE-----%0AM")))) (testing "No certificate in content"