Repository navigation
Expand file tree
/
Copy pathTiltfile
More file actions
514 lines (426 loc) · 20.3 KB
/
Copy pathTiltfile
File metadata and controls
514 lines (426 loc) · 20.3 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
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
update_settings(max_parallel_updates=10)
allow_k8s_contexts(k8s_context()) # to unblock local() in local set-ups with a Kubernetes context configured, like Docker Desktop
def resolve_env(var_name, default=None):
for line in str(read_file('.env')).splitlines():
if line.startswith(var_name + '='):
return line.strip().split('=', 1)[1]
return default
def resolve_ancillary_env(var_name, default=None):
for line in str(read_file('ancillary.env')).splitlines():
if line.startswith(var_name + '='):
return line.strip().split('=', 1)[1]
return default
# Flow tests talk to flow-api directly, so skip nexus and the UI there.
ci = os.getenv('PEERDB_CI') == '1'
compose = read_yaml('./docker-compose-dev.yml')
if ci:
compose['services'].pop('peerdb')
compose['services'].pop('peerdb-ui')
# CI can load the flow images, built once per workflow run, instead of having
# every runner build them. Drop their compose build sections too, so neither
# Tilt nor compose rebuilds them.
prebuilt_flow_images = os.getenv('PEERDB_CI_PREBUILT_FLOW_IMAGES') == '1'
if prebuilt_flow_images:
for svc in ['flow-migrate', 'flow-api', 'flow-worker', 'flow-snapshot-worker']:
compose['services'][svc].pop('build')
# Use an already running Temporal instead of the temporal containers, e.g. one shared with
# other local services. It must have the default namespace and the MirrorName search attribute.
external_temporal = os.getenv('EXTERNAL_TEMPORAL_HOST_PORT', resolve_env('EXTERNAL_TEMPORAL_HOST_PORT', ''))
temporal_services = ['temporal', 'temporal-admin-tools', 'temporal-ui']
if external_temporal:
for svc in temporal_services:
compose['services'].pop(svc)
for svc in compose['services'].values():
env = svc.get('environment')
if type(env) == 'dict' and 'TEMPORAL_HOST_PORT' in env:
env['TEMPORAL_HOST_PORT'] = external_temporal
deps = svc.get('depends_on')
if type(deps) == 'dict':
for dep in temporal_services:
deps.pop(dep, None)
elif type(deps) == 'list':
svc['depends_on'] = [dep for dep in deps if dep not in temporal_services]
docker_compose(encode_yaml(compose), project_name='peerdb-' + resolve_env('DEFAULT_TILT_PORT', '10350'), env_file='.env')
peerbd_ui_port = resolve_env('PEERBD_UI_PORT', '3030')
temporal_port = resolve_env('TEMPORAL_PORT', '7233')
temporal_ui_port = resolve_env('TEMPORAL_UI_PORT', '8085')
flow_api_grpc_port = resolve_env('FLOW_API_PORT', '8112')
flow_api_http_port = resolve_env('FLOW_API_HTTP_PORT', '8113')
docker_go_debug_port_flow_worker = resolve_env('DOCKER_GO_DEBUG_PORT_FLOW_WORKER', '14001')
docker_go_debug_port_flow_snapshot_worker = resolve_env('DOCKER_GO_DEBUG_PORT_FLOW_SNAPSHOT_WORKER', '14002')
docker_go_debug_port_flow_api = resolve_env('DOCKER_GO_DEBUG_PORT_FLOW_API', '14003')
flow_ignore = ['flow/e2e/', 'flow/**/*_test.go']
if not prebuilt_flow_images:
for image, debug_var in [('flow-api', 'DOCKER_GO_DEBUG_FLOW_API'),
('flow-worker', 'DOCKER_GO_DEBUG_FLOW_WORKER'),
('flow-snapshot-worker', 'DOCKER_GO_DEBUG_FLOW_SNAPSHOT_WORKER')]:
custom_build(image, 'stacks/build-flow-images.sh %s $EXPECTED_REF' % image,
deps=['flow/', 'stacks/flow.Dockerfile', 'stacks/build-flow-images.sh'],
ignore=flow_ignore,
env={debug_var: resolve_env(debug_var, '')},
)
if not ci:
docker_build('peerdb', '.',
dockerfile='stacks/peerdb-server.Dockerfile',
only=['nexus/', 'protos/', 'scripts/', 'stacks/peerdb-server.Dockerfile'],
build_args={
'BUILD_MODE': 'debug',
'CARGO_FLAGS': '--no-default-features --features mysql',
},
)
docker_build('peerdb-ui', '.',
dockerfile='stacks/peerdb-ui.Dockerfile',
target='dev',
only=['ui/', 'stacks/peerdb-ui.Dockerfile', 'stacks/ui/'],
)
local_resource(
'proto-gen',
cmd='./generate-protos.sh',
deps=['./protos'],
labels=['PeerDB'],
)
if not ci:
dc_resource('peerdb-ui', resource_deps=['proto-gen'], labels=['PeerDB'], links=[
link('http://localhost:' + str(peerbd_ui_port), 'PeerDB UI'),
])
dc_resource('peerdb', resource_deps=['proto-gen'], labels=['PeerDB'])
local_resource(
'catalog-ready',
cmd='for i in $(seq 240); do docker exec catalog pg_isready -q -h 127.0.0.1 -U postgres && exit 0; sleep 0.5; done; exit 1',
resource_deps=['catalog'],
labels=['PeerDB'],
allow_parallel=True,
)
dc_resource('flow-migrate', resource_deps=['proto-gen', 'catalog-ready'], labels=['PeerDB'])
temporal_deps = [] if external_temporal else ['temporal-ready']
dc_resource('flow-api', resource_deps=['proto-gen'] + temporal_deps, labels=['PeerDB'], links=[
link('http://localhost:' + str(flow_api_grpc_port), 'Flow API gRPC'),
link('http://localhost:' + str(flow_api_http_port), 'Flow API HTTP'),
])
if not external_temporal:
dc_resource('temporal-ui', labels=['PeerDB'], auto_init=not ci, links=[
link('http://localhost:' + str(temporal_ui_port), 'Temporal UI'),
])
dc_resource('temporal', resource_deps=['catalog-ready'], labels=['PeerDB'])
dc_resource('temporal-admin-tools', labels=['PeerDB'])
local_resource(
'temporal-ready',
cmd='for i in $(seq 240); do docker exec temporal-admin-tools temporal operator search-attribute list --namespace default 2>/dev/null | grep -qw MirrorName && exit 0; sleep 0.5; done; exit 1',
resource_deps=['temporal-admin-tools'],
labels=['PeerDB'],
allow_parallel=True,
)
dc_resource('catalog', labels=['PeerDB'])
dc_resource('flow-worker', resource_deps=['proto-gen'] + temporal_deps, labels=['PeerDB'])
dc_resource('flow-snapshot-worker', resource_deps=['proto-gen'] + temporal_deps, labels=['PeerDB'])
dc_resource('minio', labels=['PeerDB'])
# Ancillary services
local_resource(
'provision-mongodb',
cmd='./local_provision_scripts/mongodb.sh',
labels=['Ancillary-DB-Provisioning'],
resource_deps=['mongodb'],
allow_parallel=True,
)
local_resource(
'provision-clickhouse',
cmd='./local_provision_scripts/clickhouse.sh',
labels=['Ancillary-DB-Provisioning'],
resource_deps=['clickhouse'],
allow_parallel=True,
)
local_resource(
'provision-clickhouse-cluster',
cmd='./local_provision_scripts/clickhouse-cluster.sh',
labels=['Ancillary-DB-Provisioning'],
resource_deps=['provision-clickhouse', 'clickhouse-02', 'clickhouse-keeper'],
allow_parallel=True,
)
local_resource(
'provision-cockroachdb',
cmd='./local_provision_scripts/cockroachdb.sh',
labels=['Ancillary-DB-Provisioning'],
resource_deps=['cockroachdb'],
allow_parallel=True,
)
local_resource(
'provision-mysql-gtid',
cmd='./local_provision_scripts/mysql.sh peerdb-mysql-gtid',
labels=['Ancillary-DB-Provisioning'],
resource_deps=['mysql-gtid'],
allow_parallel=True,
)
local_resource(
'provision-mysql-pos',
cmd='./local_provision_scripts/mysql.sh peerdb-mysql-pos',
labels=['Ancillary-DB-Provisioning'],
resource_deps=['mysql-pos'],
allow_parallel=True,
)
local_resource(
'provision-mariadb',
cmd='./local_provision_scripts/mysql.sh peerdb-mariadb',
labels=['Ancillary-DB-Provisioning'],
resource_deps=['mariadb'],
allow_parallel=True,
)
local_resource(
'provision-postgres',
cmd='./local_provision_scripts/postgres.sh',
labels=['Ancillary-DB-Provisioning'],
resource_deps=['postgres'],
allow_parallel=True,
)
local_resource(
'provision-postgres2',
cmd='./local_provision_scripts/postgres.sh peerdb-postgres2',
labels=['Ancillary-DB-Provisioning'],
resource_deps=['postgres2'],
allow_parallel=True,
)
local_resource(
'setup-postgres-peer',
cmd='./local_provision_scripts/setup-postgres-peer.sh',
labels=['Setup-PeerDB-Peers'],
resource_deps=['flow-api', 'provision-postgres'],
allow_parallel=True,
)
local_resource(
'setup-postgres2-peer',
cmd='./local_provision_scripts/setup-postgres2-peer.sh',
labels=['Setup-PeerDB-Peers'],
resource_deps=['flow-api', 'provision-postgres2'],
allow_parallel=True,
)
local_resource(
'setup-clickhouse-peer',
cmd='./local_provision_scripts/setup-clickhouse-peer.sh',
labels=['Setup-PeerDB-Peers'],
resource_deps=['flow-api', 'provision-clickhouse', 'minio'],
allow_parallel=True,
)
local_resource(
'setup-clickhouse-cluster-peer',
cmd='./local_provision_scripts/setup-clickhouse-cluster-peer.sh',
labels=['Setup-PeerDB-Peers'],
resource_deps=['flow-api', 'provision-clickhouse-cluster', 'minio'],
allow_parallel=True,
)
local_resource(
'setup-cockroachdb-peer',
cmd='./local_provision_scripts/setup-cockroachdb-peer.sh',
labels=['Setup-PeerDB-Peers'],
resource_deps=['flow-api', 'provision-cockroachdb'],
allow_parallel=True,
)
local_resource(
'setup-mongodb-peer',
cmd='./local_provision_scripts/setup-mongodb-peer.sh',
labels=['Setup-PeerDB-Peers'],
resource_deps=['flow-api', 'provision-mongodb'],
allow_parallel=True,
)
local_resource(
'setup-mysql-gtid-peer',
cmd='./local_provision_scripts/setup-mysql-gtid-peer.sh',
labels=['Setup-PeerDB-Peers'],
resource_deps=['flow-api', 'provision-mysql-gtid'],
allow_parallel=True,
)
local_resource(
'setup-mysql-pos-peer',
cmd='./local_provision_scripts/setup-mysql-pos-peer.sh',
labels=['Setup-PeerDB-Peers'],
resource_deps=['flow-api', 'provision-mysql-pos'],
allow_parallel=True,
)
local_resource(
'setup-mariadb-peer',
cmd='./local_provision_scripts/setup-mariadb-peer.sh',
labels=['Setup-PeerDB-Peers'],
resource_deps=['flow-api', 'provision-mariadb'],
allow_parallel=True,
)
# CI (tilt-flow.yml) exports the ancillary image pins as empty strings when
# their workflow inputs are omitted, and compose interpolation lets a
# set-but-empty process variable shadow the env_file fallbacks that
# scripts/generate-test-environment.sh resolves into ancillary.env.
for var in [k for k in os.environ.keys() if k.endswith('_IMAGE') and os.environ[k] == '']:
os.unsetenv(var)
# This is not defined as a resource as we need the file to be present
# when `docker_compose` loads the configuration (next line).
local('./scripts/generate-test-environment.sh')
tiltfile_dir = config.main_path.replace('/Tiltfile', '')
docker_compose('./ancillary-docker-compose.yml', env_file=tiltfile_dir + '/ancillary.env')
# Data storages for tests, they are not automatically started to save resources.
# Their provisioning step resources are autostarted but blocked on the manual activation
# of their corresponding datastore.
# This way, users can choose which ones to start and when, depending on the tests they want to run.
dc_resource('clickhouse', labels=['Ancillary-DB'], links=[
link('http://localhost:' + resolve_ancillary_env('CI_CLICKHOUSE_HTTP_PORT', '8123'), 'ClickHouse HTTP'),
link('http://localhost:' + resolve_ancillary_env('CI_CLICKHOUSE_NATIVE_PORT', '9000'), 'ClickHouse TCP'),
], auto_init=False)
dc_resource('clickhouse-keeper', labels=['Ancillary-DB'], auto_init=False)
dc_resource('clickhouse-02', labels=['Ancillary-DB'], links=[
link('http://localhost:' + resolve_ancillary_env('CI_CLICKHOUSE_HTTP_PORT_02', '13123'), 'CH Node 2 HTTP'),
link('http://localhost:' + resolve_ancillary_env('CI_CLICKHOUSE_NATIVE_PORT_02', '13000'), 'CH Node 2 TCP'),
], auto_init=False)
dc_resource('cockroachdb', labels=['Ancillary-DB'], links=[
link('http://localhost:' + resolve_ancillary_env('CI_COCKROACH_PORT', '26257'), 'CockroachDB'),
], auto_init=False)
dc_resource('mongodb', labels=['Ancillary-DB'], links=[
link('http://localhost:' + resolve_ancillary_env('CI_MONGO_PORT', '27017'), 'MongoDB'),
], auto_init=False)
dc_resource('mysql-gtid', labels=['Ancillary-DB'], links=[
link('http://localhost:' + resolve_ancillary_env('CI_MYSQL_GTID_PORT', '3306'), 'MySQL GTID'),
], auto_init=False)
dc_resource('mysql-pos', labels=['Ancillary-DB'], links=[
link('http://localhost:' + resolve_ancillary_env('CI_MYSQL_POS_PORT', '3307'), 'MySQL File-Pos'),
], auto_init=False)
dc_resource('mariadb', labels=['Ancillary-DB'], links=[
link('http://localhost:' + resolve_ancillary_env('CI_MARIADB_PORT', '3308'), 'MariaDB'),
], auto_init=False)
dc_resource('postgres', labels=['Ancillary-DB'], links=[
link('http://localhost:' + resolve_ancillary_env('PG_PORT', '5436'), 'PostgreSQL'),
], auto_init=False)
dc_resource('postgres2', labels=['Ancillary-DB'], links=[
link('http://localhost:' + resolve_ancillary_env('PG2_PORT', '5437'), 'PostgreSQL (secondary)'),
], auto_init=False)
local_resource(
'all-test-resources',
cmd=' '.join([
"resources=$(tilt --port 10352 get uiresource -o json |",
"jq -r '.items[] | select(.metadata.labels[\"Ancillary-DB\"] or .metadata.labels[\"Ancillary-TestInfra\"]) | .metadata.name');",
"tilt --port 10352 enable $resources &&",
"for r in $resources; do tilt --port 10352 trigger $r; done",
]),
labels=['Ancillary-Utilities'],
auto_init=False,
)
# Monitoring and utility tools
dc_resource('dozzle', labels=['Monitoring'], auto_init=not ci, links=[
link('http://localhost:8118', 'Dozzle Container Monitor'),
])
# Test services: Services supporting test execution that are not data stores, like proxies, mock servers, etc.
dc_resource('toxiproxy', labels=['Ancillary-TestInfra'], auto_init=False)
dc_resource('openssh', labels=['Ancillary-TestInfra'], auto_init=False)
dc_resource('otel-collector', labels=['Ancillary-TestInfra'], auto_init=False)
# Cleanup
load('ext://uibutton', 'cmd_button', 'location')
cmd_button(
'cleanup-ancillary-volumes',
argv=['sh', '-c', ' '.join([
"for v in $(yq '.volumes | keys[]' ancillary-docker-compose.yml);",
'do if docker volume rm peerdb_$v;',
'then echo "Removed $v";',
'else echo "Failed to remove $v (may be in use or not exist)";',
'fi; done',
])],
text='Wipe ancillary volumes',
icon_name='delete',
location=location.NAV
)
cmd_button(
'Clean-up test code caches',
argv=['sh', '-c', 'cd flow && go clean -cache'],
text='Clean-up test code caches',
icon_name='delete_sweep',
resource='Test',
location=location.NAV
)
# Tests launchers
def e2e_test(name, package, test_run, extra_deps=[], vars_overrides={}):
overrides_str = ' '.join(['%s=%s' % (var, value) for var, value in vars_overrides.items()])
local_resource(
'e2e_' + name,
cmd='cd flow && %s go test -tags tilt -count=1 -v -run %s ./e2e/%s/' % (overrides_str, test_run, package),
labels=['Test'],
auto_init=False,
resource_deps=['flow-api', 'flow-worker', 'catalog', 'provision-clickhouse'] + extra_deps,
allow_parallel=True,
)
def connector_test(connector, extra_deps=[], vars_overrides={}, name=''):
overrides_str = ' '.join(['%s=%s' % (var, value) for var, value in vars_overrides.items()])
local_resource(
'connector_' + (name or connector),
cmd='cd flow && %s go test -tags tilt -count=1 -v ./connectors/%s/...' % (overrides_str, connector),
labels=['Test'],
auto_init=False,
resource_deps=['catalog'] + extra_deps,
allow_parallel=True,
)
def pkg_test(pkg, extra_deps=[], vars_overrides={}, test_run='', name=''):
overrides_str = ' '.join(['%s=%s' % (var, value) for var, value in vars_overrides.items()])
test_run_arg = (' -run %s' % test_run) if test_run else ''
local_resource(
'pkg_' + (name or pkg),
cmd='cd flow/pkg && %s go test -tags tilt -count=1 -v%s ./%s/...' % (overrides_str, test_run_arg, pkg),
labels=['Test'],
auto_init=False,
resource_deps=extra_deps,
# some tests are stateful so no parallel
)
# These are overrides to provide different MySQL flavors with the same test definitions.
mysql_gtid_vars = {
'CI_MYSQL_PORT': resolve_env('CI_MYSQL_GTID_PORT'),
'CI_MYSQL_VERSION': resolve_env('CI_MYSQL_GTID_VERSION'),
'CI_MYSQL_ROOT_PASSWORD': resolve_env('CI_MYSQL_ROOT_PASSWORD'),
'CI_SSH_MYSQL_HOST': resolve_env('CI_SSH_MYSQL_HOST'),
}
mysql_pos_vars = {
'CI_MYSQL_PORT': resolve_env('CI_MYSQL_POS_PORT'),
'CI_MYSQL_VERSION': resolve_env('CI_MYSQL_POS_VERSION'),
'CI_MYSQL_ROOT_PASSWORD': resolve_env('CI_MYSQL_ROOT_PASSWORD'),
'CI_SSH_MYSQL_HOST': resolve_env('CI_SSH_MYSQL_HOST'),
}
mariadb_vars = {
'CI_MYSQL_HOST': resolve_env('CI_MARIADB_HOST'),
'CI_MYSQL_PORT': resolve_env('CI_MARIADB_PORT'),
'CI_MYSQL_VERSION': resolve_env('CI_MARIADB_VERSION'),
'CI_MYSQL_ROOT_PASSWORD': resolve_env('CI_MARIADB_ROOT_PASSWORD'),
}
# Generic e2e tests
# Postgres to ClickHouse generic tests
e2e_test('postgres', 'postgres_clickhouse', 'TestGenericCH_PG', ['provision-postgres'])
e2e_test('postgres-tls', 'postgres_clickhouse', 'TestGenericCH_PG', ['provision-postgres'], vars_overrides={'PG_REQUIRE_TLS': 'true', 'PG_ROOT_CA_PATH': '$(pwd)/../volumes/pg-tls/server.crt'})
# MySQL GTID to ClickHouse generic tests
e2e_test('mysql-gtid', 'mysql_clickhouse', 'TestGenericCH_MySQL', ['provision-mysql-gtid'], vars_overrides=mysql_gtid_vars)
# MySQL Pos to ClickHouse generic tests
e2e_test('mysql-pos', 'mysql_clickhouse', 'TestGenericCH_MySQL', ['provision-mysql-pos'], vars_overrides=mysql_pos_vars)
# MariaDB to ClickHouse generic tests
e2e_test('mariadb', 'mysql_clickhouse', 'TestGenericCH_MySQL', ['provision-mariadb'], vars_overrides=mariadb_vars)
# MongoDB to ClickHouse test suite
e2e_test('mongodb', 'mongo_clickhouse', 'TestMongoClickhouseSuite', ['provision-mongodb'])
# CockroachDB source tests (peer/introspection suite and QRep to ClickHouse)
e2e_test('cockroachdb', 'cockroachdb_clickhouse', 'TestCockroachDB', ['provision-cockroachdb'],
vars_overrides={'COCKROACHDB_IMAGE': resolve_ancillary_env('COCKROACHDB_IMAGE')})
# Switchboard tests
e2e_test('switchboard-postgres', 'switchboard_postgres', 'TestSwitchboardPostgres', ['provision-postgres'])
e2e_test('switchboard-mysql-gtid', 'switchboard_mysql', 'TestSwitchboardMySQL', ['provision-mysql-gtid'], vars_overrides=mysql_gtid_vars)
e2e_test('switchboard-mysql-pos', 'switchboard_mysql', 'TestSwitchboardMySQL', ['provision-mysql-pos'], vars_overrides=mysql_pos_vars)
e2e_test('switchboard-mariadb', 'switchboard_mysql', 'TestSwitchboardMySQL', ['provision-mariadb'], vars_overrides=mariadb_vars)
e2e_test('switchboard-mongodb', 'switchboard_mongo', 'TestSwitchboardMongo', ['provision-mongodb'])
# Peer flow E2E
e2e_test('peer-flow-postgres', 'postgres_clickhouse', '^TestPeerFlowE2ETestSuitePG_CH$', ['provision-postgres'])
e2e_test('peer-flow-mysql-gtid', 'mysql_clickhouse', '^TestPeerFlowE2ETestSuiteMySQL_CH$', ['provision-mysql-gtid'], vars_overrides=mysql_gtid_vars)
e2e_test('peer-flow-mysql-pos', 'mysql_clickhouse', '^TestPeerFlowE2ETestSuiteMySQL_CH$', ['provision-mysql-pos'], vars_overrides=mysql_pos_vars)
e2e_test('peer-flow-mariadb', 'mysql_clickhouse', '^TestPeerFlowE2ETestSuiteMySQL_CH$', ['provision-mariadb'], vars_overrides=mariadb_vars)
# API e2e tests
e2e_test('api-postgres', 'postgres_clickhouse', 'TestApiPg', ['provision-postgres'])
e2e_test('api-mysql-gtid', 'mysql_clickhouse', 'TestApiMy', ['provision-mysql-gtid'], vars_overrides=mysql_gtid_vars)
e2e_test('api-mysql-pos', 'mysql_clickhouse', 'TestApiMy', ['provision-mysql-pos'], vars_overrides=mysql_pos_vars)
e2e_test('api-mariadb', 'mysql_clickhouse', 'TestApiMy', ['provision-mariadb'], vars_overrides=mariadb_vars)
e2e_test('api-mongodb', 'mongo_clickhouse', 'TestApiMongo', ['provision-mongodb'])
# Connectors tests
connector_test('postgres', ['provision-postgres'])
connector_test('mysql', ['provision-mysql-gtid'], vars_overrides=mysql_gtid_vars, name='mysql-gtid')
connector_test('mysql', ['provision-mysql-pos'], vars_overrides=mysql_pos_vars, name='mysql-pos')
connector_test('mysql', ['provision-mariadb'], vars_overrides=mariadb_vars, name='mariadb')
connector_test('mongo', ['provision-mongodb'])
connector_test('clickhouse', ['provision-clickhouse'])
# flow/pkg module tests
pkg_test('mongo', ['provision-mongodb'])
pkg_test('clickhouse', ['provision-clickhouse'])
pkg_test('mysql', ['provision-mysql-gtid'], vars_overrides=mysql_gtid_vars, name='mysql-gtid')
pkg_test('mysql', ['provision-mysql-pos'], vars_overrides=mysql_pos_vars, name='mysql-pos')
pkg_test('mysql', ['provision-mariadb'], vars_overrides=mariadb_vars, name='mariadb')