Commit 81d5baee authored by Miek Gieben's avatar Miek Gieben

middleware/cache: fix metrics test

Fix the metrics test, top-level test directory still referenced the
old metrics name.
parent 1b923add
...@@ -73,7 +73,7 @@ func TestMetricsRefused(t *testing.T) { ...@@ -73,7 +73,7 @@ func TestMetricsRefused(t *testing.T) {
} }
func TestMetricsCache(t *testing.T) { func TestMetricsCache(t *testing.T) {
metricName := "coredns_cache_size_guage" metricName := "coredns_cache_size"
corefile := `example.net:0 { corefile := `example.net:0 {
proxy . 8.8.8.8:53 proxy . 8.8.8.8:53
...@@ -97,7 +97,7 @@ func TestMetricsCache(t *testing.T) { ...@@ -97,7 +97,7 @@ func TestMetricsCache(t *testing.T) {
} }
data := mtest.Scrape(t, "http://"+metrics.ListenAddr+"/metrics") data := mtest.Scrape(t, "http://"+metrics.ListenAddr+"/metrics")
// Get the value for the metrics where the one of the labels values matches "success" // Get the value for the metrics where the one of the labels values matches "success".
got, _ := mtest.MetricValueLabel(metricName, cache.Success, data) got, _ := mtest.MetricValueLabel(metricName, cache.Success, data)
if got != "1" { if got != "1" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment