test(01-03): add integration tests for health, OpenAPI, protocol version, forward compat, and TTL

- HealthControllerIT: health returns 200, no protocol header needed, TTL verified
- OpenApiIT: api-docs returns OpenAPI spec, swagger UI accessible
- ProtocolVersionIT: missing/wrong header returns 400, correct header passes, excluded paths work
- ForwardCompatIT: unknown JSON fields do not cause deserialization errors
- Fix testcontainers version to 2.0.3 (docker-java 3.7.0 for Docker Desktop 29.x compat)
- Fix ClickHouse schema: TTL with toDateTime() cast, non-nullable error columns for tokenbf_v1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-11 12:03:00 +01:00
parent b8a4739f72
commit 2d3fde3766
8 changed files with 220 additions and 20 deletions

View File

@@ -11,8 +11,8 @@ CREATE TABLE IF NOT EXISTS route_executions (
duration_ms UInt64,
correlation_id String,
exchange_id String,
error_message Nullable(String),
error_stacktrace Nullable(String),
error_message String DEFAULT '',
error_stacktrace String DEFAULT '',
-- Nested processor executions stored as parallel arrays
processor_ids Array(String),
processor_types Array(LowCardinality(String)),
@@ -29,7 +29,7 @@ CREATE TABLE IF NOT EXISTS route_executions (
ENGINE = MergeTree()
PARTITION BY toYYYYMMDD(start_time)
ORDER BY (agent_id, status, start_time, execution_id)
TTL start_time + INTERVAL 30 DAY
TTL toDateTime(start_time) + toIntervalDay(30)
SETTINGS ttl_only_drop_parts = 1;
CREATE TABLE IF NOT EXISTS route_diagrams (
@@ -53,5 +53,5 @@ CREATE TABLE IF NOT EXISTS agent_metrics (
ENGINE = MergeTree()
PARTITION BY toYYYYMMDD(collected_at)
ORDER BY (agent_id, metric_name, collected_at)
TTL collected_at + INTERVAL 30 DAY
TTL toDateTime(collected_at) + toIntervalDay(30)
SETTINGS ttl_only_drop_parts = 1;