Add unit tests for Helm chart
Signed-off-by: Ricardo Lopes <ricardoapl.dev@gmail.com>
This commit is contained in:
parent
02776b42a5
commit
e1a3194694
2 changed files with 32 additions and 0 deletions
|
@ -196,3 +196,18 @@ tests:
|
||||||
- equal:
|
- equal:
|
||||||
path: spec.template.spec.automountServiceAccountToken
|
path: spec.template.spec.automountServiceAccountToken
|
||||||
value: false
|
value: false
|
||||||
|
|
||||||
|
- it: should create a Deployment with extraPorts if `defaultBackend.service.extraPorts` is set
|
||||||
|
set:
|
||||||
|
defaultBackend.enabled: true
|
||||||
|
defaultBackend.service.extraPorts[0]:
|
||||||
|
name: example
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 9999
|
||||||
|
asserts:
|
||||||
|
- contains:
|
||||||
|
path: spec.template.spec.containers[0].ports
|
||||||
|
content:
|
||||||
|
name: example
|
||||||
|
protocol: TCP
|
||||||
|
containerPort: 9999
|
||||||
|
|
|
@ -50,3 +50,20 @@ tests:
|
||||||
value:
|
value:
|
||||||
- 10.0.0.1
|
- 10.0.0.1
|
||||||
- fd00::1
|
- fd00::1
|
||||||
|
|
||||||
|
- it: should create a Service with extraPorts if `defaultBackend.service.extraPorts` is set
|
||||||
|
set:
|
||||||
|
defaultBackend.enabled: true
|
||||||
|
defaultBackend.service.extraPorts[0]:
|
||||||
|
name: example
|
||||||
|
port: 8888
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 65535
|
||||||
|
asserts:
|
||||||
|
- contains:
|
||||||
|
path: spec.ports
|
||||||
|
content:
|
||||||
|
name: example
|
||||||
|
port: 8888
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 65535
|
||||||
|
|
Loading…
Reference in a new issue