This repository has been archived on 2024-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
onechart/charts/onechart/tests/service_ports_test.yaml
T
2021-04-28 10:21:53 +02:00

67 lines
1.6 KiB
YAML

suite: test deployment
templates:
- service.yaml
tests:
- it: Should set custom ports
set:
ports:
- containerPort: 21
name: ftp
- containerPort: 3001
name: passive-1
- containerPort: 3002
name: passive-2
asserts:
- equal:
path: spec.ports
value:
- name: ftp
port: 21
targetPort: ftp
protocol: TCP
- name: passive-1
port: 3001
targetPort: passive-1
protocol: TCP
- name: passive-2
port: 3002
targetPort: passive-2
protocol: TCP
- it: Should set custom svc port
set:
ports:
- containerPort: 2021
svcPort: 21
name: ftp
- containerPort: 3001
nodePort: 33001
name: passive-1
- containerPort: 3002
name: passive-2
asserts:
- equal:
path: spec.ports
value:
- name: ftp
port: 21
targetPort: ftp
protocol: TCP
- name: passive-1
port: 3001
nodePort: 33001
targetPort: passive-1
protocol: TCP
- name: passive-2
port: 3002
targetPort: passive-2
protocol: TCP
- it: Should set default port
asserts:
- equal:
path: spec.ports
value:
- port: 80
targetPort: http
protocol: TCP
name: http