Skip to content

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

Merged
merged 6 commits into from
Nov 4, 2021

Conversation

gabbyasuncion
Copy link
Contributor

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).

@gabbyasuncion gabbyasuncion marked this pull request as ready for review November 1, 2021 15:43
Copy link
Contributor

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks 👍

Copy link
Contributor

@kevinAlbs kevinAlbs left a 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.

Copy link
Contributor

@benjirewis benjirewis left a 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.

Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gabbyasuncion gabbyasuncion merged commit 9fdc7d2 into mongodb:master Nov 4, 2021
@gabbyasuncion gabbyasuncion deleted the godriver-2083 branch November 4, 2021 14:56
gabbyasuncion added a commit to gabbyasuncion/mongo-go-driver that referenced this pull request Nov 18, 2021
faem pushed a commit to kubedb/mongo-go-driver that referenced this pull request Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants