Skip to content

CDRIVER-4358 sync allowDiskUse CRUD spec tests #979

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 1 commit into from
May 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 155 additions & 0 deletions src/libmongoc/tests/json/crud/unified/aggregate-allowdiskuse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"description": "aggregate-allowdiskuse",
"schemaVersion": "1.0",
"createEntities": [
{
"client": {
"id": "client0",
"observeEvents": [
"commandStartedEvent"
]
}
},
{
"database": {
"id": "database0",
"client": "client0",
"databaseName": "crud-tests"
}
},
{
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "coll0"
}
}
],
"initialData": [
{
"collectionName": "coll0",
"databaseName": "crud-tests",
"documents": []
}
],
"tests": [
{
"description": "Aggregate does not send allowDiskUse when value is not specified",
"operations": [
{
"object": "collection0",
"name": "aggregate",
"arguments": {
"pipeline": [
{
"$match": {}
}
]
}
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"command": {
"aggregate": "coll0",
"pipeline": [
{
"$match": {}
}
],
"allowDiskUse": {
"$$exists": false
}
},
"commandName": "aggregate",
"databaseName": "crud-tests"
}
}
]
}
]
},
{
"description": "Aggregate sends allowDiskUse false when false is specified",
"operations": [
{
"object": "collection0",
"name": "aggregate",
"arguments": {
"pipeline": [
{
"$match": {}
}
],
"allowDiskUse": false
}
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"command": {
"aggregate": "coll0",
"pipeline": [
{
"$match": {}
}
],
"allowDiskUse": false
},
"commandName": "aggregate",
"databaseName": "crud-tests"
}
}
]
}
]
},
{
"description": "Aggregate sends allowDiskUse true when true is specified",
"operations": [
{
"object": "collection0",
"name": "aggregate",
"arguments": {
"pipeline": [
{
"$match": {}
}
],
"allowDiskUse": true
}
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"command": {
"aggregate": "coll0",
"pipeline": [
{
"$match": {}
}
],
"allowDiskUse": true
},
"commandName": "aggregate",
"databaseName": "crud-tests"
}
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
],
"tests": [
{
"description": "Find does not send allowDiskuse when value is not specified",
"description": "Find does not send allowDiskUse when value is not specified",
"operations": [
{
"object": "collection0",
Expand Down Expand Up @@ -61,7 +61,7 @@
]
},
{
"description": "Find sends allowDiskuse false when false is specified",
"description": "Find sends allowDiskUse false when false is specified",
"operations": [
{
"object": "collection0",
Expand Down