From f097f39ceaefffae118863a67d92b6b8398029ad Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Mon, 2 Sep 2024 10:04:34 +0100 Subject: [PATCH] chore: pin helm unittest, update to match 0.6.1 spec --- .github/workflows/helm-validation.yaml | 4 +- ...roker_cra_deployment_disable_tls_test.yaml | 6 ++ ...broker_deployment_rename_secrets_test.yaml | 60 +++++-------------- 3 files changed, 23 insertions(+), 47 deletions(-) diff --git a/.github/workflows/helm-validation.yaml b/.github/workflows/helm-validation.yaml index 165449c..5103463 100644 --- a/.github/workflows/helm-validation.yaml +++ b/.github/workflows/helm-validation.yaml @@ -21,5 +21,5 @@ jobs: - name: Run helm unittest run: | - helm plugin install https://github.com/helm-unittest/helm-unittest - helm unittest charts/snyk-broker \ No newline at end of file + helm plugin install https://github.com/helm-unittest/helm-unittest --version 0.6.1 + helm unittest charts/snyk-broker diff --git a/charts/snyk-broker/tests/broker_cra_deployment_disable_tls_test.yaml b/charts/snyk-broker/tests/broker_cra_deployment_disable_tls_test.yaml index d2434a7..d666c19 100644 --- a/charts/snyk-broker/tests/broker_cra_deployment_disable_tls_test.yaml +++ b/charts/snyk-broker/tests/broker_cra_deployment_disable_tls_test.yaml @@ -25,6 +25,7 @@ tests: documentSelector: path: kind value: Deployment + matchMany: true - it: disables tls trust with "0" (string) set: tlsRejectUnauthorized: "0" @@ -37,6 +38,7 @@ tests: documentSelector: path: kind value: Deployment + matchMany: true - it: disables tls trust with "false" (string) set: tlsRejectUnauthorized: "false" @@ -49,6 +51,7 @@ tests: documentSelector: path: kind value: Deployment + matchMany: true - it: disables tls trust with false (boolean) set: tlsRejectUnauthorized: false @@ -61,6 +64,7 @@ tests: documentSelector: path: kind value: Deployment + matchMany: true - it: disables tls trust with '0' (integer) set: tlsRejectUnauthorized: 0 @@ -73,6 +77,7 @@ tests: documentSelector: path: kind value: Deployment + matchMany: true - it: enables tls trust by default "" (string) set: tlsRejectUnauthorized: "" @@ -85,6 +90,7 @@ tests: documentSelector: path: kind value: Deployment + matchMany: true - it: does not allow true (bool) set: tlsRejectUnauthorized: true diff --git a/charts/snyk-broker/tests/broker_deployment_rename_secrets_test.yaml b/charts/snyk-broker/tests/broker_deployment_rename_secrets_test.yaml index 57826b5..32e56ae 100644 --- a/charts/snyk-broker/tests/broker_deployment_rename_secrets_test.yaml +++ b/charts/snyk-broker/tests/broker_deployment_rename_secrets_test.yaml @@ -23,9 +23,7 @@ tests: secretKeyRef: name: my-cool-secret key: my-cool-key - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - exists: path: data.my-cool-key documentSelector: @@ -48,9 +46,7 @@ tests: secretKeyRef: name: my-cool-secret key: my-cool-key - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - exists: path: data.my-cool-key documentSelector: @@ -73,9 +69,7 @@ tests: secretKeyRef: name: my-cool-secret key: my-cool-key - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - exists: path: data.my-cool-key documentSelector: @@ -98,9 +92,7 @@ tests: secretKeyRef: name: my-cool-secret key: my-cool-key - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - exists: path: data.my-cool-key documentSelector: @@ -123,9 +115,7 @@ tests: secretKeyRef: name: my-cool-secret key: my-cool-key - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - exists: path: data.my-cool-key documentSelector: @@ -148,9 +138,7 @@ tests: secretKeyRef: name: my-cool-secret key: my-cool-key - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - exists: path: data.my-cool-key documentSelector: @@ -173,9 +161,7 @@ tests: secretKeyRef: name: my-cool-secret key: my-cool-key - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - exists: path: data.my-cool-key documentSelector: @@ -199,9 +185,7 @@ tests: secretKeyRef: name: my-cool-secret key: my-cool-key - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - exists: path: data.my-cool-key documentSelector: @@ -225,9 +209,7 @@ tests: secretKeyRef: name: my-cool-secret key: my-cool-key - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - exists: path: data.my-cool-key documentSelector: @@ -250,9 +232,7 @@ tests: secretKeyRef: name: my-external-pool key: my-pool-of-keys - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - exists: path: data.my-pool-of-keys documentSelector: @@ -279,9 +259,7 @@ tests: secretKeyRef: name: external-artifactory-url key: my-custom-key - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - exists: path: data.my-custom-key documentSelector: @@ -325,9 +303,7 @@ tests: secretKeyRef: name: private-nexus-url key: nexus-nexus-url - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - contains: path: spec.template.spec.containers[0].env content: @@ -336,9 +312,7 @@ tests: secretKeyRef: name: private-nexus-base-url key: nexus-base-nexus-url - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - exists: path: data.nexus-base-nexus-url documentSelector: @@ -363,9 +337,7 @@ tests: name: RELEASE-NAME-snyk-broker-tls-secret-volume secret: secretName: my-external-secret - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml - it: References an external CA secret @@ -379,6 +351,4 @@ tests: name: RELEASE-NAME-snyk-broker-cacert-volume secret: secretName: my-ca - documentSelector: - path: kind - value: Deployment + template: broker_deployment.yaml