mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
rules: two places need to call EmptyLabels
Can't assume nil is a valid value. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
parent
66da1d51fd
commit
3f7ba22bde
|
@ -919,8 +919,8 @@ func TestAlertingEvalWithOrigin(t *testing.T) {
|
|||
time.Second,
|
||||
time.Minute,
|
||||
lbs,
|
||||
nil,
|
||||
nil,
|
||||
labels.EmptyLabels(),
|
||||
labels.EmptyLabels(),
|
||||
"",
|
||||
true, log.NewNopLogger(),
|
||||
)
|
||||
|
|
|
@ -29,7 +29,7 @@ import (
|
|||
type unknownRule struct{}
|
||||
|
||||
func (u unknownRule) Name() string { return "" }
|
||||
func (u unknownRule) Labels() labels.Labels { return nil }
|
||||
func (u unknownRule) Labels() labels.Labels { return labels.EmptyLabels() }
|
||||
func (u unknownRule) Eval(ctx context.Context, time time.Time, queryFunc QueryFunc, url *url.URL, i int) (promql.Vector, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue