mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
app/vmselect/promql: adjust tests after the upgrade of github.com/VictoriaMetrics/metrics from v1.8.3 to v1.9.0
This commit is contained in:
parent
66c53bf3c6
commit
c28876172f
1 changed files with 20 additions and 11 deletions
|
@ -2682,7 +2682,11 @@ func TestExecSuccess(t *testing.T) {
|
|||
})
|
||||
t.Run(`histogram(scalar)`, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
q := `histogram(123)`
|
||||
q := `sort(histogram(123)+(
|
||||
label_set(0, "le", "1.2e2"),
|
||||
label_set(0, "le", "1.4e2"),
|
||||
label_set(1, "le", "+Inf"),
|
||||
))`
|
||||
r1 := netstorage.Result{
|
||||
MetricName: metricNameExpected,
|
||||
Values: []float64{0, 0, 0, 0, 0, 0},
|
||||
|
@ -2691,7 +2695,7 @@ func TestExecSuccess(t *testing.T) {
|
|||
r1.MetricName.Tags = []storage.Tag{
|
||||
{
|
||||
Key: []byte("le"),
|
||||
Value: []byte("1e2"),
|
||||
Value: []byte("1.2e2"),
|
||||
},
|
||||
}
|
||||
r2 := netstorage.Result{
|
||||
|
@ -2702,12 +2706,12 @@ func TestExecSuccess(t *testing.T) {
|
|||
r2.MetricName.Tags = []storage.Tag{
|
||||
{
|
||||
Key: []byte("le"),
|
||||
Value: []byte("2e2"),
|
||||
Value: []byte("1.4e2"),
|
||||
},
|
||||
}
|
||||
r3 := netstorage.Result{
|
||||
MetricName: metricNameExpected,
|
||||
Values: []float64{1, 1, 1, 1, 1, 1},
|
||||
Values: []float64{2, 2, 2, 2, 2, 2},
|
||||
Timestamps: timestampsExpected,
|
||||
}
|
||||
r3.MetricName.Tags = []storage.Tag{
|
||||
|
@ -2723,9 +2727,14 @@ func TestExecSuccess(t *testing.T) {
|
|||
t.Parallel()
|
||||
q := `sort(histogram((
|
||||
label_set(1, "foo", "bar"),
|
||||
label_set(1.5, "xx", "yy"),
|
||||
alias(1.9, "foobar"),
|
||||
)))`
|
||||
label_set(1.1, "xx", "yy"),
|
||||
alias(1.15, "foobar"),
|
||||
))+(
|
||||
label_set(0, "le", "9.8e-1"),
|
||||
label_set(0, "le", "1.0e0"),
|
||||
label_set(0, "le", "1.2e0"),
|
||||
label_set(1, "le", "+Inf"),
|
||||
))`
|
||||
r1 := netstorage.Result{
|
||||
MetricName: metricNameExpected,
|
||||
Values: []float64{0, 0, 0, 0, 0, 0},
|
||||
|
@ -2734,7 +2743,7 @@ func TestExecSuccess(t *testing.T) {
|
|||
r1.MetricName.Tags = []storage.Tag{
|
||||
{
|
||||
Key: []byte("le"),
|
||||
Value: []byte("9e-1"),
|
||||
Value: []byte("9.8e-1"),
|
||||
},
|
||||
}
|
||||
r2 := netstorage.Result{
|
||||
|
@ -2745,7 +2754,7 @@ func TestExecSuccess(t *testing.T) {
|
|||
r2.MetricName.Tags = []storage.Tag{
|
||||
{
|
||||
Key: []byte("le"),
|
||||
Value: []byte("1"),
|
||||
Value: []byte("1.0e0"),
|
||||
},
|
||||
}
|
||||
r3 := netstorage.Result{
|
||||
|
@ -2756,12 +2765,12 @@ func TestExecSuccess(t *testing.T) {
|
|||
r3.MetricName.Tags = []storage.Tag{
|
||||
{
|
||||
Key: []byte("le"),
|
||||
Value: []byte("2"),
|
||||
Value: []byte("1.2e0"),
|
||||
},
|
||||
}
|
||||
r4 := netstorage.Result{
|
||||
MetricName: metricNameExpected,
|
||||
Values: []float64{3, 3, 3, 3, 3, 3},
|
||||
Values: []float64{4, 4, 4, 4, 4, 4},
|
||||
Timestamps: timestampsExpected,
|
||||
}
|
||||
r4.MetricName.Tags = []storage.Tag{
|
||||
|
|
Loading…
Reference in a new issue