mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Add test for malformed le label
This annotation could be split into two to be clearer for the user (one for missing, and one for malformed). This is outside of the scope of this change. Signed-off-by: Joshua Hesketh <josh@nitrotech.org>
This commit is contained in:
parent
67a34f7f98
commit
28e37c7a38
|
@ -3514,6 +3514,16 @@ func TestHistogramQuantileAnnotations(t *testing.T) {
|
|||
},
|
||||
expectedInfoAnnotations: []string{},
|
||||
},
|
||||
"warning annotation for malformed le label": {
|
||||
data: `
|
||||
myHistogram{le="Hello World"} 0+2x10
|
||||
`,
|
||||
expr: "histogram_quantile(0.5, myHistogram)",
|
||||
expectedWarningAnnotations: []string{
|
||||
`PromQL warning: bucket label "le" is missing or has a malformed value of "Hello World" for metric name "myHistogram" (1:25)`,
|
||||
},
|
||||
expectedInfoAnnotations: []string{},
|
||||
},
|
||||
"warning annotation for mixed histograms": {
|
||||
data: `
|
||||
mixedHistogram{le="0.1"} 0+2x10
|
||||
|
|
Loading…
Reference in a new issue