-
Notifications
You must be signed in to change notification settings - Fork 266
PHPLIB-1071: Do not create ECC collection and check wire version for QEv2 #1084
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
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
793b2f4
PHPLIB-1071: Sync spec tests for QEv2 without ECC collection
jmikola 858e894
Check for omitted fields at any level of observed commands
jmikola c904c75
Remove ecc collection from CreateEncryptedCollection and DropEncrypte…
jmikola 6c07eb8
Check wire version for Queryable Encryption support in CreateEncrypte…
jmikola File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/SpecTests/client-side-encryption/etc/data/encryptedFields-Range-Date.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"fields": [ | ||
{ | ||
"keyId": { | ||
"$binary": { | ||
"base64": "EjRWeBI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
}, | ||
"path": "encryptedDate", | ||
"bsonType": "date", | ||
"queries": { | ||
"queryType": "rangePreview", | ||
"contention": { | ||
"$numberLong": "0" | ||
}, | ||
"sparsity": { | ||
"$numberLong": "1" | ||
}, | ||
"min": { | ||
"$date": { | ||
"$numberLong": "0" | ||
} | ||
}, | ||
"max": { | ||
"$date": { | ||
"$numberLong": "200" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
23 changes: 23 additions & 0 deletions
23
tests/SpecTests/client-side-encryption/etc/data/encryptedFields-Range-Decimal.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"fields": [ | ||
{ | ||
"keyId": { | ||
"$binary": { | ||
"base64": "EjRWeBI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
}, | ||
"path": "encryptedDecimal", | ||
"bsonType": "decimal", | ||
"queries": { | ||
"queryType": "rangePreview", | ||
"contention": { | ||
"$numberLong": "0" | ||
}, | ||
"sparsity": { | ||
"$numberLong": "1" | ||
} | ||
} | ||
} | ||
] | ||
} |
32 changes: 32 additions & 0 deletions
32
tests/SpecTests/client-side-encryption/etc/data/encryptedFields-Range-DecimalPrecision.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"fields": [ | ||
{ | ||
"keyId": { | ||
"$binary": { | ||
"base64": "EjRWeBI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
}, | ||
"path": "encryptedDecimalPrecision", | ||
"bsonType": "decimal", | ||
"queries": { | ||
"queryType": "rangePreview", | ||
"contention": { | ||
"$numberLong": "0" | ||
}, | ||
"sparsity": { | ||
"$numberLong": "1" | ||
}, | ||
"min": { | ||
"$numberDecimal": "0.0" | ||
}, | ||
"max": { | ||
"$numberDecimal": "200.0" | ||
}, | ||
"precision": { | ||
"$numberInt": "2" | ||
} | ||
} | ||
} | ||
] | ||
} |
23 changes: 23 additions & 0 deletions
23
tests/SpecTests/client-side-encryption/etc/data/encryptedFields-Range-Double.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"fields": [ | ||
{ | ||
"keyId": { | ||
"$binary": { | ||
"base64": "EjRWeBI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
}, | ||
"path": "encryptedDouble", | ||
"bsonType": "double", | ||
"queries": { | ||
"queryType": "rangePreview", | ||
"contention": { | ||
"$numberLong": "0" | ||
}, | ||
"sparsity": { | ||
"$numberLong": "1" | ||
} | ||
} | ||
} | ||
] | ||
} |
32 changes: 32 additions & 0 deletions
32
tests/SpecTests/client-side-encryption/etc/data/encryptedFields-Range-DoublePrecision.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"fields": [ | ||
{ | ||
"keyId": { | ||
"$binary": { | ||
"base64": "EjRWeBI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
}, | ||
"path": "encryptedDoublePrecision", | ||
"bsonType": "double", | ||
"queries": { | ||
"queryType": "rangePreview", | ||
"contention": { | ||
"$numberLong": "0" | ||
}, | ||
"sparsity": { | ||
"$numberLong": "1" | ||
}, | ||
"min": { | ||
"$numberDouble": "0.0" | ||
}, | ||
"max": { | ||
"$numberDouble": "200.0" | ||
}, | ||
"precision": { | ||
"$numberInt": "2" | ||
} | ||
} | ||
} | ||
] | ||
} |
29 changes: 29 additions & 0 deletions
29
tests/SpecTests/client-side-encryption/etc/data/encryptedFields-Range-Int.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"fields": [ | ||
{ | ||
"keyId": { | ||
"$binary": { | ||
"base64": "EjRWeBI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
}, | ||
"path": "encryptedInt", | ||
"bsonType": "int", | ||
"queries": { | ||
"queryType": "rangePreview", | ||
"contention": { | ||
"$numberLong": "0" | ||
}, | ||
"sparsity": { | ||
"$numberLong": "1" | ||
}, | ||
"min": { | ||
"$numberInt": "0" | ||
}, | ||
"max": { | ||
"$numberInt": "200" | ||
} | ||
} | ||
} | ||
] | ||
} |
29 changes: 29 additions & 0 deletions
29
tests/SpecTests/client-side-encryption/etc/data/encryptedFields-Range-Long.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"fields": [ | ||
{ | ||
"keyId": { | ||
"$binary": { | ||
"base64": "EjRWeBI0mHYSNBI0VniQEg==", | ||
"subType": "04" | ||
} | ||
}, | ||
"path": "encryptedLong", | ||
"bsonType": "long", | ||
"queries": { | ||
"queryType": "rangePreview", | ||
"contention": { | ||
"$numberLong": "0" | ||
}, | ||
"sparsity": { | ||
"$numberLong": "1" | ||
}, | ||
"min": { | ||
"$numberLong": "0" | ||
}, | ||
"max": { | ||
"$numberLong": "200" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Note: the previous code for this function was:
This caused multiple test failures in the
getMore.json
test, which asserts that thegetMore
field of the outgoing command matches{ "$$type": "long" }
. The actual value in that case is an integer, which was problematic forassertInstanceOf()
above.Rather than rewrite
assertCommandOmittedFields()
to skip special operations (i.e. keys starting with "$$"), which is only defined in the CSFLE legacy test format, I opted to just NOP and avoid recursion. This keepsassertCommandOmittedFields()
focused on it's original purpose of only asserting omitted fields and allows the caller to handle everything else (likely viaassertDocumentsMatch()
).