mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
63 lines
1.4 KiB
YAML
63 lines
1.4 KiB
YAML
suite: service port names
|
|
templates:
|
|
- common.yaml
|
|
tests:
|
|
- it: default should pass
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 2
|
|
- documentIndex: &ServiceDocument 1
|
|
isKind:
|
|
of: Service
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: spec.ports[0]
|
|
value:
|
|
name: http
|
|
port: null
|
|
protocol: TCP
|
|
targetPort: http
|
|
|
|
- it: custom name should pass
|
|
set:
|
|
service:
|
|
main:
|
|
ports:
|
|
http:
|
|
enabled: false
|
|
server:
|
|
enabled: true
|
|
port: 8080
|
|
asserts:
|
|
- documentIndex: &ServiceDocument 1
|
|
isKind:
|
|
of: Service
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: spec.ports[0]
|
|
value:
|
|
name: server
|
|
port: 8080
|
|
protocol: TCP
|
|
targetPort: server
|
|
|
|
- it: custom target port should pass
|
|
set:
|
|
service:
|
|
main:
|
|
ports:
|
|
http:
|
|
enabled: true
|
|
targetPort: 80
|
|
asserts:
|
|
- documentIndex: &ServiceDocument 1
|
|
isKind:
|
|
of: Service
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: spec.ports[0]
|
|
value:
|
|
name: http
|
|
port: null
|
|
protocol: TCP
|
|
targetPort: 80
|