fix(ci): add tenant_id to health_metrics test insert, rollback before cleanup
- test_monitoring_api: health_metrics INSERT was missing tenant_id column - conftest: rollback failed transactions before TRUNCATE cleanup Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -78,13 +78,14 @@ class TestHealthMetrics:
|
||||
await admin_session.execute(
|
||||
text(
|
||||
"INSERT INTO health_metrics "
|
||||
"(device_id, time, cpu_load, free_memory, total_memory, "
|
||||
"(device_id, tenant_id, time, cpu_load, free_memory, total_memory, "
|
||||
"free_disk, total_disk, temperature) "
|
||||
"VALUES (:device_id, :ts, :cpu, :free_mem, :total_mem, "
|
||||
"VALUES (:device_id, :tenant_id, :ts, :cpu, :free_mem, :total_mem, "
|
||||
":free_disk, :total_disk, :temp)"
|
||||
),
|
||||
{
|
||||
"device_id": str(device.id),
|
||||
"tenant_id": str(tenant.id),
|
||||
"ts": ts,
|
||||
"cpu": 30 + i * 5,
|
||||
"free_mem": 500000000,
|
||||
|
||||
Reference in New Issue
Block a user