jenkins-infra / helm-charts

Helm chart repository containing the jenkins-infra public charts.
7 stars 25 forks source link

fix(mirrorbits-parent): correct ingress custom test #1141

Closed lemeurherve closed 4 months ago

lemeurherve commented 4 months ago

This PR fixes mirrorbits-parent's ingress custom test.

No idea yet why this passed our pipelines without failing 🤔

Before: ```console ✗ helm unittest charts/mirrorbits-parent ### Chart [ mirrorbits-parent ] charts/mirrorbits-parent FAIL Tests with custom values charts/mirrorbits-parent/tests/custom_values_ingress_test.yaml - should fail the ingress when a host's path does not have backendService - asserts[0] `failedTemplate` fail Template: mirrorbits-parent/templates/ingress.yaml DocumentIndex: 0 Expected to equal: Required key: backendService for ingress.hosts[].paths[] objects must have the value 'httpd' or 'mirrorbits'. Actual: backendService for ingress.hosts[].paths[] objects must have the value 'httpd' or 'mirrorbits'. - should fail the ingress when a host's path has an unknown backendService - asserts[0] `failedTemplate` fail Template: mirrorbits-parent/templates/ingress.yaml DocumentIndex: 0 Expected to equal: Required key: backendService for ingress.hosts[].paths[] objects must have the value 'httpd' or 'mirrorbits'. Actual: backendService for ingress.hosts[].paths[] objects must have the value 'httpd' or 'mirrorbits'. PASS Tests with custom values charts/mirrorbits-parent/tests/custom_values_serviceaccount_test.yaml PASS Tests with custom values charts/mirrorbits-parent/tests/custom_values_storage_test.yaml PASS tests for the storager with defaults charts/mirrorbits-parent/tests/defaults_storage_test.yaml PASS default tests charts/mirrorbits-parent/tests/defaults_test.yaml Charts: 1 failed, 0 passed, 1 total Test Suites: 1 failed, 4 passed, 5 total Tests: 2 failed, 17 passed, 19 total Snapshot: 0 passed, 0 total Time: 43.717625ms Error: plugin "unittest" exited with error ```
lemeurherve commented 4 months ago

The issue seems to come from the helm unittest installed on my machine (0.3.4), checking if it's passing with the last one.

lemeurherve commented 4 months ago

That's it, no error on main with last 0.4.4 version of helm-unittest 🤦

Closing, sorry for the noise.