-
-
Notifications
You must be signed in to change notification settings - Fork 613
Expand file tree
/
Copy pathbasic_test.yaml
More file actions
58 lines (57 loc) · 1.44 KB
/
basic_test.yaml
File metadata and controls
58 lines (57 loc) · 1.44 KB
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
suite: gateway basic test
templates:
- common.yaml
release:
name: test-release-name
namespace: test-release-namespace
tests:
- it: should create a gateway when enabled
set:
gateway:
main:
enabled: true
gatewayClassName: test-gateway-class
listeners:
- name: http
port: 80
protocol: HTTP
asserts:
- documentIndex: &gatewayDoc 0
isKind:
of: Gateway
- documentIndex: *gatewayDoc
isAPIVersion:
of: gateway.networking.k8s.io/v1
- documentIndex: *gatewayDoc
equal:
path: metadata.name
value: test-release-name-common-test
- documentIndex: *gatewayDoc
equal:
path: spec.gatewayClassName
value: test-gateway-class
- documentIndex: *gatewayDoc
equal:
path: spec.listeners[0].name
value: http
- documentIndex: *gatewayDoc
equal:
path: spec.listeners[0].port
value: 80
- documentIndex: *gatewayDoc
equal:
path: spec.listeners[0].protocol
value: HTTP
- it: should not create a gateway when disabled
set:
gateway:
main:
enabled: false
gatewayClassName: test-gateway-class
listeners:
- name: http
port: 80
protocol: HTTP
asserts:
- hasDocuments:
count: 0