PYTHON-1565 Add helpers and options for Change Streams Follow-on Work (#355) Add MongoClient.watch() and Database.watch(). Add start_at_operation_time to all watch() helpers.
79 lines
1.8 KiB
JSON
79 lines
1.8 KiB
JSON
{
|
|
"collection_name": "test",
|
|
"database_name": "change-stream-tests",
|
|
"collection2_name": "test2",
|
|
"database2_name": "change-stream-tests-2",
|
|
"tests": [
|
|
{
|
|
"description": "The watch helper must not throw a custom exception when executed against a single server topology, but instead depend on a server error",
|
|
"minServerVersion": "3.6.0",
|
|
"target": "collection",
|
|
"topology": [
|
|
"single"
|
|
],
|
|
"changeStreamPipeline": [],
|
|
"changeStreamOptions": {},
|
|
"operations": [],
|
|
"expectations": [],
|
|
"result": {
|
|
"error": {
|
|
"code": 40573
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"description": "Change Stream should error when an invalid aggregation stage is passed in",
|
|
"minServerVersion": "3.6.0",
|
|
"target": "collection",
|
|
"topology": [
|
|
"replicaset"
|
|
],
|
|
"changeStreamPipeline": [
|
|
{
|
|
"$unsupported": "foo"
|
|
}
|
|
],
|
|
"changeStreamOptions": {},
|
|
"operations": [
|
|
{
|
|
"database": "change-stream-tests",
|
|
"collection": "test",
|
|
"name": "insertOne",
|
|
"arguments": {
|
|
"document": {
|
|
"z": 3
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"expectations": [
|
|
{
|
|
"command_started_event": {
|
|
"command": {
|
|
"aggregate": "test",
|
|
"cursor": {},
|
|
"pipeline": [
|
|
{
|
|
"$changeStream": {
|
|
"fullDocument": "default"
|
|
}
|
|
},
|
|
{
|
|
"$unsupported": "foo"
|
|
}
|
|
]
|
|
},
|
|
"command_name": "aggregate",
|
|
"database_name": "change-stream-tests"
|
|
}
|
|
}
|
|
],
|
|
"result": {
|
|
"error": {
|
|
"code": 40324
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|