mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08: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…
Reference in a new issue