mirror of
https://gitea.com/gitea/helm-chart.git
synced 2024-06-02 02:11:23 +05:30
feat: add unittests
This commit is contained in:
parent
9f5dbcb828
commit
1cb9f724d5
51
unittests/deployment/svc-configuration.yaml
Normal file
51
unittests/deployment/svc-configuration.yaml
Normal file
|
@ -0,0 +1,51 @@
|
|||
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"]
|
Loading…
Reference in a new issue