Repository navigation
Expand file tree
/
Copy pathtest-sqlite.yaml
More file actions
58 lines (48 loc) · 1.7 KB
/
Copy pathtest-sqlite.yaml
File metadata and controls
58 lines (48 loc) · 1.7 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
name: sqlite-tutorial
description: Tests Debezium SQLite connector via the tutorial setup
env_file: ../.env
compose_file: docker-compose-sqlite.yaml
cleanup:
type: docker_compose_down
volumes: true
steps:
- name: Build the Connect image with the SQLite connector
type: docker_compose_build
services: connect
- name: Start all services
type: docker_compose_up
detach: true
- name: Wait for Kafka Connect REST API to be ready
type: http_wait
url: http://localhost:8083/connectors
timeout_seconds: 120
interval_seconds: 5
- name: Create the SQLite database and insert test data
type: local_exec
command: "cat debezium-sqlite-init/inventory.sql | docker compose --env-file ../.env -f docker-compose-sqlite.yaml exec -T connect sqlite3 /data/inventory.db"
- name: Register Debezium SQLite connector
type: http_post
url: http://localhost:8083/connectors/
body_file: register-sqlite.json
expected_status: [200, 201]
- name: Wait for connector to be RUNNING
type: http_wait
url: http://localhost:8083/connectors/inventory-connector/status
timeout_seconds: 60
interval_seconds: 5
expected_json_path: connector.state
expected_value: RUNNING
- name: Verify the snapshot appears in Kafka
type: kafka_consume
topic: dbserver1.customers
timeout_seconds: 60
expected_content: "Sally"
- name: Make change in SQLite database
type: docker_compose_exec
service: connect
command: "sqlite3 /data/inventory.db \"UPDATE customers SET first_name = 'Sarah' WHERE id = 1001;\""
- name: Verify change appears in Kafka
type: kafka_consume
topic: dbserver1.customers
timeout_seconds: 60
expected_content: "Sarah"