mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
71 lines
1.8 KiB
YAML
71 lines
1.8 KiB
YAML
suite: service protocols
|
|
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].protocol
|
|
value: TCP
|
|
|
|
- it: explicit TCP should pass
|
|
set:
|
|
service.main.ports.http.protocol: TCP
|
|
asserts:
|
|
- documentIndex: &ServiceDocument 1
|
|
isKind:
|
|
of: Service
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: spec.ports[0].protocol
|
|
value: TCP
|
|
|
|
- it: explicit UDP should pass
|
|
set:
|
|
service.main.ports.http.protocol: UDP
|
|
asserts:
|
|
- documentIndex: &ServiceDocument 1
|
|
isKind:
|
|
of: Service
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: spec.ports[0].protocol
|
|
value: UDP
|
|
|
|
- it: explicit HTTP should pass
|
|
set:
|
|
service.main.ports.http.protocol: HTTP
|
|
asserts:
|
|
- documentIndex: &ServiceDocument 1
|
|
isKind:
|
|
of: Service
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: spec.ports[0].protocol
|
|
value: TCP
|
|
- documentIndex: *ServiceDocument
|
|
isNull:
|
|
path: metadata.annotations
|
|
|
|
- it: explicit HTTPS should pass
|
|
set:
|
|
service.main.ports.http.protocol: HTTPS
|
|
asserts:
|
|
- documentIndex: &ServiceDocument 1
|
|
isKind:
|
|
of: Service
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: spec.ports[0].protocol
|
|
value: TCP
|
|
- documentIndex: *ServiceDocument
|
|
equal:
|
|
path: metadata.annotations
|
|
value:
|
|
traefik.ingress.kubernetes.io/service.serversscheme: https
|