-
Notifications
You must be signed in to change notification settings - Fork 4
/
ingress_1_18_className_test.yaml
62 lines (62 loc) · 1.86 KB
/
ingress_1_18_className_test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
suite: test ingress with Kubernetes 1.18 and className set
templates:
- ingress.yaml
tests:
- it: should work
capabilities:
majorVersion: 1
minorVersion: 18
set:
config:
rpcAddress: "rpcAddress_value"
smartContractAddress: "smartContractAddress_value"
smartContractAbi: "smartContractAbi_value"
secrets:
orgAccountJson: "{ \"key\": \"value\" }"
ingress:
enabled: true
className: "className_test"
annotations:
annotation_1: "annotation_1_test"
annotation_2: "annotation_2_test"
hosts:
- host: host_test
paths:
- path: /path_test
pathType: pathType_test
asserts:
- isKind:
of: Ingress
- matchRegex:
path: metadata.name
pattern: -ethadapter$
# ingressClassName should be set for >= 1.18
- equal:
path: spec.ingressClassName
value: className_test
# annotation should not be set
- isNull:
path: metadata.annotations.kubernetes\.io/ingress\.class
value: className_test
- equal:
path: metadata.annotations.annotation_1
value: annotation_1_test
- equal:
path: metadata.annotations.annotation_2
value: annotation_2_test
- equal:
path: spec.rules[0].host
value: host_test
# Pathtype must be for >= 1.18
- equal:
path: spec.rules[0].http.paths[0].pathType
value: pathType_test
# backend.service must not be set before 1.19
- isNull:
path: spec.rules[0].http.paths[0].backend.service
- matchRegex:
path: spec.rules[0].http.paths[0].backend.serviceName
pattern: -ethadapter$
- equal:
path: spec.rules[0].http.paths[0].backend.servicePort
value: 3000