Skip to content

Commit 7ce24c0

Browse files
committed
🎉 add helm-unittest tests for service options
1 parent 760e0c0 commit 7ce24c0

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
suite: Testing `root.service` option in `service.yaml` 1/1
3+
templates:
4+
- service.yaml
5+
values:
6+
- values/valid/values.yaml
7+
chart:
8+
version: 1.0.0
9+
appVersion: 1.0.0
10+
set:
11+
service:
12+
annotations:
13+
annotation-1: annotation-value-1
14+
annotation-2: annotation-value-2
15+
tests:
16+
- it: Validate use of `service` option in `Service`
17+
documentSelector:
18+
path: $[?(@.kind == "Service")].metadata.name
19+
value: RELEASE-NAME-cert-manager-webhook-ovh
20+
asserts:
21+
- equal:
22+
path: kind
23+
value: Service
24+
- equal:
25+
path: metadata.name
26+
value: RELEASE-NAME-cert-manager-webhook-ovh
27+
- equal:
28+
path: spec.type
29+
value: ClusterIP
30+
- equal:
31+
path: spec.ports[0].port
32+
value: 443
33+
- equal:
34+
path: spec.selector["app.kubernetes.io/name"]
35+
value: cert-manager-webhook-ovh
36+
- equal:
37+
path: spec.selector["app.kubernetes.io/instance"]
38+
value: RELEASE-NAME
39+
- equal:
40+
path: metadata.annotations["annotation-1"]
41+
value: annotation-value-1
42+
- equal:
43+
path: metadata.annotations["annotation-2"]
44+
value: annotation-value-2

0 commit comments

Comments
 (0)