-
Notifications
You must be signed in to change notification settings - Fork 912
GODRIVER-2083: Test serialization of BSON with embedded null bytes in strings #784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
I think one more case in the prose tests is required.
I suggest adding to the tests added in GODRIVER-1923:
- TestNullBytes in bson/marshal_test.go
- TestNullBytes in x/bsonx/bsoncore/bsoncore_test.go
Those have cases for embedded NULL bytes, but I think need the case Field name within a sub-document
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Sorry for not spotting the need for prose tests when I approved before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
GODRIVER-2083
Syncs Go Driver BSON corpus spec tests with those indicated here. Also updates BSON corpus spec test to validate null bytes when encoding JSON to BSON and to raise the expected error (as done here).