diff --git a/pkg/expr/hysteresis_test.go b/pkg/expr/hysteresis_test.go index 49d75ac7c66..9a58a1a3492 100644 --- a/pkg/expr/hysteresis_test.go +++ b/pkg/expr/hysteresis_test.go @@ -15,7 +15,7 @@ import ( func TestHysteresisExecute(t *testing.T) { number := func(label string, value float64) mathexp.Number { - n := mathexp.NewNumber("A", data.Labels{"label": label}) + n := mathexp.NewNumber("B", data.Labels{"label": label}) n.SetValue(&value) return n } diff --git a/pkg/expr/threshold.go b/pkg/expr/threshold.go index b8991df2f94..6a1903f10cc 100644 --- a/pkg/expr/threshold.go +++ b/pkg/expr/threshold.go @@ -120,7 +120,7 @@ func (tc *ThresholdCommand) Execute(ctx context.Context, now time.Time, vars mat return mathexp.Results{}, err } - mathCommand, err := NewMathCommand(tc.ReferenceVar, mathExpression) + mathCommand, err := NewMathCommand(tc.RefID, mathExpression) if err != nil { return mathexp.Results{}, err }