We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93c851f commit ae94210Copy full SHA for ae94210
prometheus/testutil/testutil_test.go
@@ -396,6 +396,18 @@ func TestScrapeAndCompare(t *testing.T) {
396
metricNames: []string{"some_total1", "some_total3"},
397
expectedErr: "expected metric name(s) not found: [some_total1 some_total3]",
398
},
399
+ "metric registered but absent": {
400
+ want: `
401
+ # HELP some_total A value that represents a counter.
402
+ # TYPE some_total counter
403
+
404
+ some_total{ label1 = "value1" } 1
405
406
+ # HELP some_total2 A value that represents a counter.
407
+ # TYPE some_total2 counter
408
+ `,
409
+ metricNames: []string{"some_total2"},
410
+ },
411
}
412
for name, scenario := range scenarios {
413
t.Run(name, func(t *testing.T) {
0 commit comments