-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path50_connector_updates.yml
244 lines (222 loc) · 6.79 KB
/
50_connector_updates.yml
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
---
requires:
stack: true
serverless: true
---
setup:
- do:
connector.put:
connector_id: test-connector-updates
body:
index_name: search-1-test
name: my-connector
language: pl
is_native: false
service_type: super-connector
---
teardown:
- do:
connector.delete:
connector_id: test-connector-updates
---
"Update Connector Name":
- do:
connector.update_name:
connector_id: test-connector-updates
body:
name: test-name
- match: { result: updated }
- do:
connector.update_filtering:
connector_id: test-connector-updates
body:
advanced_snippet:
created_at: "2023-05-25T12:30:00.000Z"
updated_at: "2023-05-25T12:30:00.000Z"
value:
- tables:
- some_table
query: 'SELECT id, st_geohash(coordinates) FROM my_db.some_table;'
rules:
- created_at: "2023-06-25T12:30:00.000Z"
field: _
id: DEFAULT
order: 0
policy: include
rule: regex
updated_at: "2023-05-25T12:30:00.000Z"
value: ".*"
- match: { result: updated }
- do:
connector.update_filtering_validation:
connector_id: test-connector-updates
body:
validation:
state: valid
errors: []
- match: { result: updated }
- do:
connector.update_active_filtering:
connector_id: test-connector-updates
- match: { result: updated }
- do:
connector.get:
connector_id: test-connector-updates
- match: { filtering.0.draft.advanced_snippet.created_at: "2023-05-25T12:30:00.000Z" }
- match: { filtering.0.draft.advanced_snippet.value.0.tables.0.: "some_table" }
- match: { filtering.0.draft.rules.0.created_at: "2023-06-25T12:30:00.000Z" }
- match: { filtering.0.active.advanced_snippet.created_at: "2023-05-25T12:30:00.000Z" }
- match: { filtering.0.active.advanced_snippet.value.0.tables.0.: "some_table" }
- match: { filtering.0.active.rules.0.created_at: "2023-06-25T12:30:00.000Z" }
- do:
connector.update_error:
connector_id: test-connector-updates
body:
error: "some error"
- match: { result: updated }
- do:
connector.update_configuration:
connector_id: test-connector-updates
body:
configuration:
some_field:
default_value: null
depends_on:
- field: some_field
value: 31
display: numeric
label: Very important field
options: [ ]
order: 4
required: true
sensitive: false
tooltip: Wow, this tooltip is useful.
type: str
ui_restrictions: [ ]
validations:
- constraint: 0
type: greater_than
value: 123
yet_another_field:
default_value: null
depends_on:
- field: some_field
value: 31
display: numeric
label: Another important field
options: [ ]
order: 4
required: true
sensitive: false
tooltip: Wow, this tooltip is useful.
type: str
ui_restrictions: [ ]
validations:
- constraint: 0
type: greater_than
value: "peace & love"
- do:
connector.get:
connector_id: test-connector-updates
- match: { configuration.some_field.value: 123 }
- match: { configuration.some_field.sensitive: false }
- match: { configuration.some_field.display: numeric }
- match: { status: configured }
- match: { configuration.yet_another_field.value: "peace & love" }
- do:
connector.update_index_name:
connector_id: test-connector-updates
body:
index_name: search-2-test
- match: { result: updated }
- do:
connector.get:
connector_id: test-connector-updates
- match: { index_name: search-2-test }
- do:
connector.put:
connector_id: test-connector-native
body:
index_name: search-3-test
name: my-connector
language: pl
is_native: false
service_type: super-connector
- do:
connector.update_native:
connector_id: test-connector-native
body:
is_native: true
- match: { result: updated }
- do:
connector.get:
connector_id: test-connector-native
- match: { is_native: true }
- match: { status: configured }
- do:
connector.update_pipeline:
connector_id: test-connector-updates
body:
pipeline:
extract_binary_content: true
name: test-pipeline
reduce_whitespace: true
run_ml_inference: false
- match: { result: updated }
- do:
connector.get:
connector_id: test-connector-updates
- match: { pipeline.extract_binary_content: true }
- match: { pipeline.name: test-pipeline }
- match: { pipeline.reduce_whitespace: true }
- match: { pipeline.run_ml_inference: false }
- do:
connector.update_scheduling:
connector_id: test-connector-updates
body:
scheduling:
access_control:
enabled: true
interval: 1 0 0 * * ?
full:
enabled: false
interval: 2 0 0 * * ?
incremental:
enabled: false
interval: 3 0 0 * * ?
- match: { result: updated }
- do:
connector.get:
connector_id: test-connector-updates
- match: { scheduling.access_control.enabled: true }
- match: { scheduling.access_control.interval: "1 0 0 * * ?" }
- match: { scheduling.full.enabled: false }
- match: { scheduling.full.interval: "2 0 0 * * ?" }
- match: { scheduling.incremental.enabled: false }
- match: { scheduling.incremental.interval: "3 0 0 * * ?" }
- do:
connector.update_status:
connector_id: test-connector-updates
body:
status: needs_configuration
- match: { result: updated }
- do:
connector.get:
connector_id: test-connector-updates
- match: { status: needs_configuration }
- do:
connector.update_service_type:
connector_id: test-connector-updates
body:
service_type: even-better-connector
- match: { result: updated }
- do:
connector.get:
connector_id: test-connector-updates
- match: { service_type: even-better-connector }
- do:
connector.update_api_key_id:
connector_id: test-connector-updates
body:
api_key_id: test-api-key-id
- match: { result: updated }