-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathscenario.yaml
More file actions
97 lines (92 loc) · 2.55 KB
/
scenario.yaml
File metadata and controls
97 lines (92 loc) · 2.55 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
baseInputsPath: testdata
steps:
- name: 000-reset-org
skipInputs: true
commands:
- resetOrg: true
- name: 001-initial-sync
commands:
- name: 000-001-sync
run:
- sync
- -f
- "{{ .workdir }}/control-plane.yaml"
- --auto-approve
assertions:
- select: "plan.metadata"
expect:
fields:
mode: sync
- select: >-
plan.changes[?resource_type=='control_plane' &&
resource_ref=='e2e-cp'] | [0]
expect:
fields:
action: CREATE
- name: 002-sync-with-delete
inputOverlayDirs:
- overlays/002-sync-with-delete
commands:
- name: 000-002-sync
run:
- sync
- -f
- "{{ .workdir }}/control-plane.yaml"
- --auto-approve
assertions:
- select: "plan.metadata"
expect:
fields:
mode: sync
- select: "summary"
expect:
fields:
total_changes: 2
- select: >-
plan.changes[?resource_type=='control_plane' &&
resource_ref=='kongctl-e2e-cp'] | [0]
expect:
fields:
action: DELETE
- select: >-
plan.changes[?resource_type=='control_plane' &&
resource_ref=='e2e-cp-2'] | [0]
expect:
fields:
action: CREATE
- name: 001-002-verify-post-sync
run:
- get
- konnect
- gateway
- control-planes
- -o
- json
assertions:
- select: "[?name=='kongctl-e2e-cp']"
expect:
fields:
"length(@)": 0
- select: "[?name=='kongctl-e2e-cp-2'] | [0]"
expect:
fields:
name: "kongctl-e2e-cp-2"
description: "Second Test Control Plane for E2E testing via kongctl"
- name: 002-002-verify-created-fields
run:
- get
- konnect
- gateway
- control-plane
- kongctl-e2e-cp-2
- -o
- json
assertions:
- select: description
expect:
fields:
"@": "Second Test Control Plane for E2E testing via kongctl"
- select: config.cluster_type
expect:
fields:
"@": "CLUSTER_TYPE_CONTROL_PLANE"