forked from bersler/OpenLogReplicator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (29 loc) · 870 Bytes
/
Makefile
File metadata and controls
35 lines (29 loc) · 870 Bytes
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
TESTS_DIR := $(abspath ../../../..)
SCRIPTS_DIR := $(TESTS_DIR)/sql/scripts
DBZ_DIR := $(TESTS_DIR)/debezium
SCENARIOS := $(filter-out %.rac.sql,$(wildcard $(TESTS_DIR)/sql/inputs/*.sql)) $(wildcard $(TESTS_DIR)/sql/inputs/*.rac.sql)
SCENARIO ?=
.PHONY: up down test-debezium setup
# One-time setup: create c##dbzuser + grants + sentinel table on RAC
setup:
./setup.sh
# Ensure ojdbc8.jar exists (shared with tests/debezium/lib/)
$(DBZ_DIR)/lib/ojdbc8.jar:
$(MAKE) -C $(DBZ_DIR) download-ojdbc
# Start local services (receiver + Debezium connectors)
up: $(DBZ_DIR)/lib/ojdbc8.jar
docker compose up -d
down:
docker compose down -v
test-debezium:
ifdef SCENARIO
./run.sh $(SCENARIO)
else
@for sql in $(SCENARIOS); do \
name=$$(basename "$$sql"); \
name=$${name%.rac.sql}; \
name=$${name%.sql}; \
echo ""; \
./run.sh "$$name" || exit 1; \
done
endif