mirror of
https://github.com/coredns/coredns.git
synced 2026-04-10 22:15:36 -04:00
Allow selectively exporting all Go runtime metrics (#7990)
Signed-off-by: Ryan Brewster <rpb@anthropic.com>
This commit is contained in:
@@ -15,8 +15,17 @@ func TestPrometheusParse(t *testing.T) {
|
||||
// oks
|
||||
{`prometheus`, false, "localhost:9153"},
|
||||
{`prometheus localhost:53`, false, "localhost:53"},
|
||||
{`prometheus {
|
||||
runtime_metrics
|
||||
}`, false, "localhost:9153"},
|
||||
{`prometheus localhost:53 {
|
||||
runtime_metrics
|
||||
}`, false, "localhost:53"},
|
||||
// fails
|
||||
{`prometheus {}`, true, ""},
|
||||
{`prometheus {
|
||||
runtime_metrics extra_arg
|
||||
}`, true, ""},
|
||||
{`prometheus /foo`, true, ""},
|
||||
{`prometheus a b c`, true, ""},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user