module main fn test_metrics_keys() { mut app := App{ logger: new_logger(.info, false) cfg: Config{ filters: FilterConfig{} outgoing: OutgoingConfig{} state: StateConfig{} } poll_state: map[string]bool{} } app.poll_state['http://example.com'] = true app.poll_state['http://down.com'] = false app.stats.total_notifications = 42 app.stats.errors = 3 app.stats.by_source['docker'] = 10 resp := app.metrics_response() body := resp.body assert body.contains('ntfy_bridge_uptime_seconds') assert body.contains('ntfy_bridge_notifications_total 42') assert body.contains('ntfy_bridge_errors_total 3') assert body.contains('ntfy_bridge_silence_active') assert body.contains('ntfy_bridge_http_polls_total') assert body.contains('# EOF') }