You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+26-9Lines changed: 26 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,22 +55,39 @@ The same codebase produces three product tiers via feature flags:
55
55
56
56
Tests use TAP (Test Anything Protocol) with Docker-based backend infrastructure.
57
57
58
+
### Running TAP tests — DO NOT manually set up Docker containers
59
+
60
+
**ALWAYS use `run-tests-isolated.bash`**. It handles infrastructure setup, ProxySQL start, test execution, and cleanup. Never manually create Docker networks, start containers, or run init scripts — the runner does all of that.
61
+
58
62
```bash
59
-
# Build and run all TAP tests
60
-
make build_tap_tests
61
-
cd test/tap && make
63
+
# Set up infrastructure (backends + ProxySQL container)
# Located in test/infra/ with docker-compose configs for:
69
-
# mysql57, mysql84, mariadb10, pgsql16, pgsql17, clickhouse23, etc.
69
+
#Build test binaries first (requires proxysql binary)
70
+
make build_tap_tests # release
71
+
make build_tap_test_debug # debug
70
72
```
71
73
74
+
Available TAP groups are defined in `test/tap/groups/groups.json`. Group names follow the pattern `<infra>-g<N>` (e.g., `mysql84-g1`, `legacy-g2`, `pgsql16-g1`).
-**DO NOT** run `docker-compose-init.bash` directly — use `ensure-infras.bash`
81
+
-**DO NOT** symlink build artifacts between worktrees — build in each worktree separately
82
+
-**DO NOT** copy source files between worktrees or repos
83
+
-**DO NOT** run `cd test/tap/tests && make` and expect tests to pass without infrastructure
84
+
85
+
### Test file conventions
86
+
72
87
Test files follow the naming pattern `test_*.cpp` or `*-t.cpp` in `test/tap/tests/`.
73
88
89
+
Test binaries are built via a pattern rule in `test/tap/tests/Makefile`: `make <testname>-t` compiles `<testname>-t.cpp` into `<testname>-t`. No special Makefile target is needed for new tests — just add the `.cpp` file and register it in `groups.json`.
0 commit comments