Skip to content

Commit

Permalink
chore: pin helm unittest, update to match 0.6.1 spec
Browse files Browse the repository at this point in the history
  • Loading branch information
soniqua committed Sep 2, 2024
1 parent a09608c commit f097f39
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/helm-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
helm plugin install https://github.com/helm-unittest/helm-unittest --version 0.6.1
helm unittest charts/snyk-broker
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ tests:
documentSelector:
path: kind
value: Deployment
matchMany: true
- it: disables tls trust with "0" (string)
set:
tlsRejectUnauthorized: "0"
Expand All @@ -37,6 +38,7 @@ tests:
documentSelector:
path: kind
value: Deployment
matchMany: true
- it: disables tls trust with "false" (string)
set:
tlsRejectUnauthorized: "false"
Expand All @@ -49,6 +51,7 @@ tests:
documentSelector:
path: kind
value: Deployment
matchMany: true
- it: disables tls trust with false (boolean)
set:
tlsRejectUnauthorized: false
Expand All @@ -61,6 +64,7 @@ tests:
documentSelector:
path: kind
value: Deployment
matchMany: true
- it: disables tls trust with '0' (integer)
set:
tlsRejectUnauthorized: 0
Expand All @@ -73,6 +77,7 @@ tests:
documentSelector:
path: kind
value: Deployment
matchMany: true
- it: enables tls trust by default "" (string)
set:
tlsRejectUnauthorized: ""
Expand All @@ -85,6 +90,7 @@ tests:
documentSelector:
path: kind
value: Deployment
matchMany: true
- it: does not allow true (bool)
set:
tlsRejectUnauthorized: true
Expand Down
60 changes: 15 additions & 45 deletions charts/snyk-broker/tests/broker_deployment_rename_secrets_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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

0 comments on commit f097f39

Please sign in to comment.