Fix promql tests
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
This commit is contained in:
parent
1360f9ff12
commit
273ea9093a
|
@ -22,6 +22,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/prometheus/prometheus/pkg/labels"
|
||||
"github.com/prometheus/prometheus/promql/parser"
|
||||
"github.com/prometheus/prometheus/util/teststorage"
|
||||
)
|
||||
|
||||
|
|
|
@ -605,7 +605,7 @@ load 10s
|
|||
}
|
||||
|
||||
testutil.Ok(t, res.Err)
|
||||
testutil.Equals(t, c.Result, res.parser.Value)
|
||||
testutil.Equals(t, c.Result, res.Value)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -823,7 +823,7 @@ load 10s
|
|||
|
||||
res := qry.Exec(test.Context())
|
||||
testutil.Equals(t, c.Result.Err, res.Err)
|
||||
testutil.Equals(t, c.Result.parser.Value, res.parser.Value)
|
||||
testutil.Equals(t, c.Result.Value, res.Value)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1107,9 +1107,9 @@ func TestSubquerySelector(t *testing.T) {
|
|||
|
||||
res := qry.Exec(test.Context())
|
||||
testutil.Equals(t, c.Result.Err, res.Err)
|
||||
mat := res.parser.Value.(Matrix)
|
||||
mat := res.Value.(Matrix)
|
||||
sort.Sort(mat)
|
||||
testutil.Equals(t, c.Result.parser.Value, mat)
|
||||
testutil.Equals(t, c.Result.Value, mat)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ func TestLazyLoader_WithSamplesTill(t *testing.T) {
|
|||
for _, s := range tc.series {
|
||||
var matchers []*labels.Matcher
|
||||
for _, label := range s.Metric {
|
||||
m, err := labels.NewMatcher(labels.MatchEqual, label.Name, label.parser.Value)
|
||||
m, err := labels.NewMatcher(labels.MatchEqual, label.Name, label.Value)
|
||||
testutil.Ok(t, err)
|
||||
matchers = append(matchers, m)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue