test(telemetry): assert allowed attribute site_id appears in metrics exposition

Former-commit-id: 31f70e50320ada1b37044158d8cbfe48d9748391
This commit is contained in:
Marc Schäfer
2025-10-08 00:10:17 +02:00
parent ab83c071f8
commit 0c51a6d498
@@ -39,5 +39,8 @@ cfg := Config{ServiceName: "newt", PromEnabled: true, AdminAddr: "127.0.0.1:0"}
if strings.Contains(body, "forbidden=") {
t.Fatalf("unexpected forbidden attribute leaked into metrics: %s", body)
}
if !strings.Contains(body, "site_id=\"x\"") {
t.Fatalf("expected allowed attribute site_id to be present in metrics, got: %s", body)
}
}