mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-15 17:46:49 +02:00
tests: add cases for OM text
Signed-off-by: Manik Rana <manikrana54@gmail.com>
This commit is contained in:
parent
7905fbbae0
commit
c58a173382
@ -919,7 +919,16 @@ func TestManagerCTZeroIngestion(t *testing.T) {
|
||||
require.Equal(t, tc.counterSampleProto.GetValue(), got[0])
|
||||
|
||||
case "application/openmetrics-text; version=1.0.0":
|
||||
if tc.enableCTZeroIngestion && tc.exp.ts == 0 {
|
||||
require.Len(t, got, 2)
|
||||
require.Equal(t, tc.exp.value, got[1])
|
||||
require.Equal(t, 0.0, got[1])
|
||||
return
|
||||
}
|
||||
|
||||
// Expect only one, valid sample.
|
||||
require.Len(t, got, 1)
|
||||
require.Equal(t, tc.exp.value, got[0])
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user