-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRIVERS-2124: test that inserts and upserts respect null _id values
- Loading branch information
Showing
5 changed files
with
453 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
|
@@ -13,4 +13,5 @@ docs_build | |
.pytest_cache | ||
node_modules | ||
package-lock.json | ||
site | ||
package.json | ||
site |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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,57 @@ | ||
description: CRUD ID Type Tests | ||
schemaVersion: '1.0' | ||
createEntities: | ||
- client: | ||
id: client | ||
observeEvents: [commandStartedEvent] | ||
- database: | ||
id: database | ||
client: client | ||
databaseName: crud_id | ||
- collection: | ||
id: collection | ||
database: database | ||
collectionName: type_tests | ||
tests: | ||
- description: inserting _id with type null via insertOne | ||
operations: | ||
- {name: dropCollection, object: database, arguments: {collection: type_tests}} | ||
- {name: insertOne, object: collection, arguments: {document: {_id: null}}} | ||
outcome: | ||
- {databaseName: crud_id, collectionName: type_tests, documents: [{_id: null}]} | ||
- description: inserting _id with type null via insertMany | ||
operations: | ||
- {name: dropCollection, object: database, arguments: {collection: type_tests}} | ||
- {name: insertMany, object: collection, arguments: {documents: [{_id: null}]}} | ||
outcome: | ||
- {databaseName: crud_id, collectionName: type_tests, documents: [{_id: null}]} | ||
- description: inserting _id with type null via updateOne | ||
operations: | ||
- {name: dropCollection, object: database, arguments: {collection: type_tests}} | ||
- {name: updateOne, object: collection, arguments: {filter: {_id: null}, update: {$unset: {a: ''}}, upsert: true}} | ||
outcome: | ||
- {databaseName: crud_id, collectionName: type_tests, documents: [{_id: null}]} | ||
- description: inserting _id with type null via updateMany | ||
operations: | ||
- {name: dropCollection, object: database, arguments: {collection: type_tests}} | ||
- {name: updateMany, object: collection, arguments: {filter: {_id: null}, update: {$unset: {a: ''}}, upsert: true}} | ||
outcome: | ||
- {databaseName: crud_id, collectionName: type_tests, documents: [{_id: null}]} | ||
- description: inserting _id with type null via replaceOne | ||
operations: | ||
- {name: dropCollection, object: database, arguments: {collection: type_tests}} | ||
- {name: replaceOne, object: collection, arguments: {filter: {}, replacement: {_id: null}, upsert: true}} | ||
outcome: | ||
- {databaseName: crud_id, collectionName: type_tests, documents: [{_id: null}]} | ||
- description: inserting _id with type null via bulkWrite | ||
operations: | ||
- {name: dropCollection, object: database, arguments: {collection: type_tests}} | ||
- {name: bulkWrite, object: collection, arguments: {requests: [{insertOne: {document: {_id: null}}}]}} | ||
outcome: | ||
- {databaseName: crud_id, collectionName: type_tests, documents: [{_id: null}]} | ||
- description: inserting _id with type null via clientBulkWrite | ||
operations: | ||
- {name: dropCollection, object: database, arguments: {collection: type_tests}} | ||
- {name: clientBulkWrite, object: client, arguments: {models: [{namespace: crud_id.type_tests, insertOne: {document: {_id: null}}}]}} | ||
outcome: | ||
- {databaseName: crud_id, collectionName: type_tests, documents: [{_id: null}]} |
Oops, something went wrong.