mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-05 16:15:56 +00:00
update test to ignore FieldOptions field
This commit is contained in:
parent
d7e0a0a4c3
commit
269526348e
1 changed files with 22 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/molecula/featurebase/v2"
|
||||
pilosa "github.com/molecula/featurebase/v2"
|
||||
"github.com/molecula/featurebase/v2/disco"
|
||||
"github.com/molecula/featurebase/v2/encoding/proto"
|
||||
"github.com/molecula/featurebase/v2/http"
|
||||
|
|
@ -315,7 +315,27 @@ func CheckGroupBy(t *testing.T, expected, results []pilosa.GroupCount) {
|
|||
t.Fatalf("number of groupings mismatch:\n got:%+v\nwant:%+v\n", results, expected)
|
||||
}
|
||||
for i, result := range results {
|
||||
if !reflect.DeepEqual(expected[i], result) {
|
||||
// have to check each field Row individually because FieldOptions is getting set
|
||||
for j := range expected[i].Group {
|
||||
// Field:"ppa", RowID:0x3, RowKey:"", Value:(*int64)(nil), FieldOptions:
|
||||
if !reflect.DeepEqual(expected[i].Group[j].Field, result.Group[j].Field) {
|
||||
t.Fatalf("unexpected result at %d: \n got:%+v\nwant:%+v\n", i, result, expected[i])
|
||||
}
|
||||
if !reflect.DeepEqual(expected[i].Group[j].RowKey, result.Group[j].RowKey) {
|
||||
t.Fatalf("unexpected result at %d: \n got:%+v\nwant:%+v\n", i, result, expected[i])
|
||||
}
|
||||
if !reflect.DeepEqual(expected[i].Group[j].Value, result.Group[j].Value) {
|
||||
t.Fatalf("unexpected result at %d: \n got:%+v\nwant:%+v\n", i, result, expected[i])
|
||||
}
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(expected[i].Count, result.Count) {
|
||||
t.Fatalf("unexpected result at %d: \n got:%+v\nwant:%+v\n", i, result, expected[i])
|
||||
}
|
||||
if !reflect.DeepEqual(expected[i].Agg, result.Agg) {
|
||||
t.Fatalf("unexpected result at %d: \n got:%+v\nwant:%+v\n", i, result, expected[i])
|
||||
}
|
||||
if !reflect.DeepEqual(expected[i].DecimalAgg, result.DecimalAgg) {
|
||||
t.Fatalf("unexpected result at %d: \n got:%+v\nwant:%+v\n", i, result, expected[i])
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue