From b148724b7dbac09d91bc4ea863c7999e9bbcb8d4 Mon Sep 17 00:00:00 2001 From: "Benjamin R. J. Schwedler" Date: Thu, 4 Jun 2026 15:43:07 -0500 Subject: [PATCH 1/2] Bump helm-unittest to v1.1.0, fix errorPattern regexes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Helm 3.18.5 changed its JSON schema parser, producing a different error string format for schema validation failures. helm-unittest v1.0.1 documented this as a known breaking change. The posit-chronicle configmap_fail_test.yaml tests used errorPattern values that matched the old format ("ServiceLogLevel: Does not match pattern") but not the new one ("'/config/Logging/ServiceLogLevel': 'INVALID' does not match pattern"). This caused the tests to fail locally with helm-unittest >= v1.0.1 while CI (pinned to v1.0.0) continued to pass — a latent break waiting for the version bump. Relax both patterns to ".*ServiceLogLevel.*does not match pattern.*" and ".*ServiceLogFormat.*does not match pattern.*", which match both the old and new error formats. --- .github/workflows/chart-test.yaml | 2 +- charts/posit-chronicle/tests/configmap_fail_test.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/chart-test.yaml b/.github/workflows/chart-test.yaml index 38cc88a47..4d2b4a850 100644 --- a/.github/workflows/chart-test.yaml +++ b/.github/workflows/chart-test.yaml @@ -87,7 +87,7 @@ jobs: version: "v3.19.2" - name: Install helm unittest plugin - run: helm plugin install https://github.com/helm-unittest/helm-unittest.git --version v1.0.0 + run: helm plugin install https://github.com/helm-unittest/helm-unittest.git --version v1.1.0 - name: Run chart unit tests id: unittest diff --git a/charts/posit-chronicle/tests/configmap_fail_test.yaml b/charts/posit-chronicle/tests/configmap_fail_test.yaml index 402dc91f3..9164c140f 100644 --- a/charts/posit-chronicle/tests/configmap_fail_test.yaml +++ b/charts/posit-chronicle/tests/configmap_fail_test.yaml @@ -27,7 +27,7 @@ tests: ServiceLogLevel: INVALID asserts: - failedTemplate: - errorPattern: ".*ServiceLogLevel: Does not match pattern.*" + errorPattern: ".*ServiceLogLevel.*does not match pattern.*" - it: should fail for invalid log level values set: config: @@ -35,7 +35,7 @@ tests: ServiceLogFormat: INVALID asserts: - failedTemplate: - errorPattern: ".*ServiceLogFormat: Does not match pattern.*" + errorPattern: ".*ServiceLogFormat.*does not match pattern.*" - it: should fail if S3 is enabled but no bucket is specified set: config: From 4b0a26698f5be93d2e72804f3095989ef363e0f5 Mon Sep 17 00:00:00 2001 From: "Benjamin R. J. Schwedler" Date: Thu, 4 Jun 2026 15:49:44 -0500 Subject: [PATCH 2/2] Make errorPattern regexes case-insensitive Go regex is case-sensitive by default. The old Helm schema error format uses uppercase 'Does not match pattern'; the new format uses lowercase. Add (?i) to both patterns so they match either wording. --- charts/posit-chronicle/tests/configmap_fail_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/posit-chronicle/tests/configmap_fail_test.yaml b/charts/posit-chronicle/tests/configmap_fail_test.yaml index 9164c140f..78c4ed244 100644 --- a/charts/posit-chronicle/tests/configmap_fail_test.yaml +++ b/charts/posit-chronicle/tests/configmap_fail_test.yaml @@ -27,7 +27,7 @@ tests: ServiceLogLevel: INVALID asserts: - failedTemplate: - errorPattern: ".*ServiceLogLevel.*does not match pattern.*" + errorPattern: "(?i).*ServiceLogLevel.*does not match pattern.*" - it: should fail for invalid log level values set: config: @@ -35,7 +35,7 @@ tests: ServiceLogFormat: INVALID asserts: - failedTemplate: - errorPattern: ".*ServiceLogFormat.*does not match pattern.*" + errorPattern: "(?i).*ServiceLogFormat.*does not match pattern.*" - it: should fail if S3 is enabled but no bucket is specified set: config: