2024-02-21 21:52:42 +00:00
|
|
|
suite: ssh-svc / http-svc template (Services configuration)
|
|
|
|
release:
|
|
|
|
name: gitea-unittests
|
|
|
|
namespace: testing
|
|
|
|
templates:
|
|
|
|
- templates/gitea/ssh-svc.yaml
|
|
|
|
- templates/gitea/http-svc.yaml
|
|
|
|
tests:
|
|
|
|
- it: supports adding custom labels to ssh-svc
|
|
|
|
template: templates/gitea/ssh-svc.yaml
|
|
|
|
set:
|
|
|
|
service:
|
|
|
|
ssh:
|
|
|
|
labels:
|
|
|
|
gitea/testkey: testvalue
|
|
|
|
asserts:
|
|
|
|
- equal:
|
|
|
|
path: metadata.labels["gitea/testkey"]
|
|
|
|
value: 'testvalue'
|
|
|
|
|
|
|
|
- it: keeps existing labels (ssh)
|
|
|
|
template: templates/gitea/ssh-svc.yaml
|
|
|
|
set:
|
|
|
|
service:
|
|
|
|
ssh:
|
|
|
|
labels: {}
|
|
|
|
asserts:
|
|
|
|
- exists:
|
|
|
|
path: metadata.labels["app"]
|
|
|
|
|
|
|
|
- it: supports adding custom labels to http-svc
|
|
|
|
template: templates/gitea/http-svc.yaml
|
|
|
|
set:
|
|
|
|
service:
|
|
|
|
http:
|
|
|
|
labels:
|
|
|
|
gitea/testkey: testvalue
|
|
|
|
asserts:
|
|
|
|
- equal:
|
|
|
|
path: metadata.labels["gitea/testkey"]
|
|
|
|
value: 'testvalue'
|
|
|
|
|
|
|
|
- it: keeps existing labels (http)
|
|
|
|
template: templates/gitea/http-svc.yaml
|
|
|
|
set:
|
|
|
|
service:
|
|
|
|
http:
|
|
|
|
labels: {}
|
|
|
|
asserts:
|
|
|
|
- exists:
|
|
|
|
path: metadata.labels["app"]
|
2024-05-06 13:36:51 +00:00
|
|
|
|
|
|
|
- it: uses default ports to ssh-svc
|
|
|
|
template: templates/gitea/ssh-svc.yaml
|
|
|
|
asserts:
|
|
|
|
- equal:
|
|
|
|
path: spec.ports[0].port
|
|
|
|
value: 22
|
|
|
|
- equal:
|
|
|
|
path: spec.ports[0].targetPort
|
|
|
|
value: 2222
|