Skip to content

Commit

Permalink
GODRIVER-2443 Fix type and add want sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvasquez committed Apr 30, 2024
1 parent 0d80ea4 commit 926b83c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/integration/collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ func TestCollection(t *testing.T) {
err := res.Decode(&got)
assert.NoError(t, err)

assert.EqualValues(mt, tc.want, got, "expected result %v, got %v", tc.want, res)
assert.EqualValues(mt, tc.want, got, "expected result %v, got %v", tc.want, got)
})
}
})
Expand Down
7 changes: 6 additions & 1 deletion internal/integration/crud_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,12 @@ func verifyDistinctResult(
return
}

for i, iwant := range want.(bson.A) {
assert.NotNil(mt, want, "expected want to be non-nil")

arr, ok := want.(bson.A)
assert.True(mt, ok, "expected want to be a BSON array")

for i, iwant := range arr {
gotRawValue := got.Index(uint(i))

iwantType, iwantBytes, err := bson.MarshalValue(iwant)
Expand Down

0 comments on commit 926b83c

Please sign in to comment.