blob: 0e71833985b5f43614c5f4b26eaffc0f7ebc664d [file] [log] [blame]
gio4a9d83d2024-04-14 13:14:40 +04001suite: test ingress
2templates:
3 - ingress.yaml
4tests:
5 - it: should be empty if ingress is not enabled
6 asserts:
7 - hasDocuments:
8 count: 0
9 - it: should have apiVersion networking.k8s.io/v1 for k8s >= 1.19
10 set:
11 ingress.enabled: true
12 capabilities:
13 majorVersion: 1
14 minorVersion: 19
15 asserts:
16 - hasDocuments:
17 count: 1
18 - isKind:
19 of: Ingress
20 - isAPIVersion:
21 of: networking.k8s.io/v1
22 - it: should have an ingressClassName for k8s >= 1.19
23 set:
24 ingress.enabled: true
25 ingress.className: nginx-test
26 capabilities:
27 majorVersion: 1
28 minorVersion: 19
29 asserts:
30 - hasDocuments:
31 count: 1
32 - equal:
33 path: spec.ingressClassName
34 value: nginx-test
35 - it: should match snapshot of default values
36 set:
37 ingress.enabled: true
38 ingress.className: nginx-test
39 ingress.annotations:
40 kubernetes.io/ingress.class: nginx
41 kubernetes.io/tls-acme: "true"
42 ingress.tls:
43 - secretName: chart-example-tls
44 hosts:
45 - chart-example.local
46 asserts:
47 - matchSnapshot: { }