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

This commit is contained in:
Marc Schäfer
2025-10-08 00:10:17 +02:00
parent 31514f26df
commit 31f70e5032

View File

@@ -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)
}
}