helm-charts/charts/other/common-chart/tests/container/ports_test.yaml
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs a1a80f5ff5
feat(common)!: Migrate library chart
2022-08-07 11:45:41 +02:00

95 lines
2 KiB
YAML

suite: container ports
templates:
- common.yaml
tests:
- it: default should pass
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[0].ports[0]
value:
containerPort: null
name: http
protocol: TCP
- it: custom port should pass
set:
service:
main:
ports:
http:
enabled: false
server:
enabled: true
port: 8080
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[0].ports[0]
value:
containerPort: 8080
name: server
protocol: TCP
- it: HTTP protocol should pass
set:
service:
main:
ports:
http:
protocol: HTTP
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[0].ports[0]
value:
containerPort: null
name: http
protocol: TCP
- it: HTTPS protocol should pass
set:
service:
main:
ports:
http:
protocol: HTTPS
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[0].ports[0]
value:
containerPort: null
name: http
protocol: TCP
- it: UDP protocol should pass
set:
service:
main:
ports:
http:
protocol: UDP
asserts:
- documentIndex: 0
isKind:
of: Deployment
- documentIndex: 0
equal:
path: spec.template.spec.containers[0].ports[0]
value:
containerPort: null
name: http
protocol: UDP