feat: full-stack Docker Compose integration tests

- 4-container stack: ClickHouse, platform (Rocky 9), bot-detector, dashboard
- Platform builds sentinel on Rocky (CGO+libpcap native), correlator static
- mod-reqin-log compiled with apxs on Rocky (matching RPM build target)
- ClickHouse init script patches credentials for test env (sed-based)
- 8-phase test runner: schema, traffic gen, pipeline, dashboard API, bot-detector, sentinel
- All 13 checks pass, 3 non-blocking warnings (empty dicts, log paths)

SQL schema fixes discovered during integration:
- 02_dictionaries: IPv6CIDR → String (not a valid ClickHouse type)
- 03_anubis_tables: dict_anubis_ua missing has_ip/rule_id/category attrs
- 03_anubis_tables: dict_anubis_country FLAT() → COMPLEX_KEY_HASHED() (String key)
- 09_audit_table: CODEC before DEFAULT → DEFAULT before CODEC

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
toto
2026-04-07 20:33:25 +02:00
parent 7b8dff2925
commit d4e7e674d8
17 changed files with 888 additions and 5 deletions

View File

@ -6,6 +6,7 @@
.PHONY: build-all test-all rpm-all dist \
build-sentinel test-sentinel rpm-sentinel \
test-integration \
test-mod-reqin-log rpm-mod-reqin-log \
build-correlator test-correlator rpm-correlator \
build-bot-detector test-bot-detector \
@ -127,3 +128,14 @@ test-ja4common-python:
-t ja4-platform/ja4common-python-tests:latest \
shared/python/ja4_common/
docker run --rm ja4-platform/ja4common-python-tests:latest
# --- integration (full-stack) -----------------------------------------------
test-integration:
cd tests/integration && ./run-tests.sh
test-integration-keep:
cd tests/integration && ./run-tests.sh --no-down
test-integration-down:
cd tests/integration && docker compose down -v --remove-orphans