fix vet shadow issue

This commit is contained in:
Matthew Jaffee 2022-01-10 10:59:44 -06:00
parent 7fbd371038
commit db87a3c4f7

View file

@ -974,8 +974,8 @@ func TestBatches(t *testing.T) {
}
}
res := results[1]
cols := res.Row().Columns
if !reflect.DeepEqual(cols, []uint64{0, 2, 4, 6, 8, 10, 12, 14, 16, 18}) {
if cols := res.Row().Columns; !reflect.DeepEqual(cols, []uint64{0, 2, 4, 6, 8, 10, 12, 14, 16, 18}) {
t.Fatalf("unexpected columns for field 1 row b: %v", cols)
}
@ -1003,23 +1003,25 @@ func TestBatches(t *testing.T) {
t.Fatalf("querying: %v", err)
}
results = resp.Results()
cols = results[0].Row().Columns
if !reflect.DeepEqual(cols, []uint64{0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28}) {
if cols := results[0].Row().Columns; !reflect.DeepEqual(cols, []uint64{0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28}) {
t.Fatalf("all columns (but 8) should be greater than -11, but got: %v", cols)
}
cols = results[1].Row().Columns
if !reflect.DeepEqual(cols, []uint64{19, 21, 23, 25, 27}) {
if cols := results[1].Row().Columns; !reflect.DeepEqual(cols, []uint64{19, 21, 23, 25, 27}) {
t.Fatalf("wrong cols for ==0: %v", cols)
}
cols = results[2].Row().Columns
if !reflect.DeepEqual(cols, []uint64{20, 22, 24, 26, 28}) {
if cols := results[2].Row().Columns; !reflect.DeepEqual(cols, []uint64{20, 22, 24, 26, 28}) {
t.Fatalf("wrong cols for ==100: %v", cols)
}
cols = results[3].Row().Columns
cols := results[3].Row().Columns
exp := []uint64{0, 2, 4, 6, 10, 12, 14, 16, 18}
if !reflect.DeepEqual(cols, exp) {
t.Fatalf("wrong cols for January: got/want\n%v\n%v", cols, exp)
}
cols = results[4].Row().Columns
exp = []uint64{1, 3, 5, 7}
if !reflect.DeepEqual(cols, exp) {