-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Kwabena Ampofo
authored
May 3, 2022
1 parent
28f8675
commit c54df3f
Showing
4 changed files
with
234 additions
and
4 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
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" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
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,75 @@ | ||
description: aggregate-allowdiskuse | ||
|
||
schemaVersion: '1.0' | ||
|
||
createEntities: | ||
- client: | ||
id: &client0 client0 | ||
observeEvents: [ commandStartedEvent ] | ||
- database: | ||
id: &database0 database0 | ||
client: *client0 | ||
databaseName: &database0Name crud-tests | ||
- collection: | ||
id: &collection0 collection0 | ||
database: *database0 | ||
collectionName: &collection0Name coll0 | ||
|
||
initialData: | ||
- collectionName: *collection0Name | ||
databaseName: *database0Name | ||
documents: [] | ||
|
||
tests: | ||
- description: 'Aggregate does not send allowDiskUse when value is not specified' | ||
operations: | ||
- object: *collection0 | ||
name: aggregate | ||
arguments: | ||
pipeline: &pipeline [ { $match: {} } ] | ||
expectEvents: | ||
- client: *client0 | ||
events: | ||
- commandStartedEvent: | ||
command: | ||
aggregate: *collection0Name | ||
pipeline: *pipeline | ||
allowDiskUse: { $$exists: false } | ||
commandName: aggregate | ||
databaseName: *database0Name | ||
|
||
- description: 'Aggregate sends allowDiskUse false when false is specified' | ||
operations: | ||
- object: *collection0 | ||
name: aggregate | ||
arguments: | ||
pipeline: *pipeline | ||
allowDiskUse: false | ||
expectEvents: | ||
- client: *client0 | ||
events: | ||
- commandStartedEvent: | ||
command: | ||
aggregate: *collection0Name | ||
pipeline: *pipeline | ||
allowDiskUse: false | ||
commandName: aggregate | ||
databaseName: *database0Name | ||
|
||
- description: 'Aggregate sends allowDiskUse true when true is specified' | ||
operations: | ||
- object: *collection0 | ||
name: aggregate | ||
arguments: | ||
pipeline: *pipeline | ||
allowDiskUse: true | ||
expectEvents: | ||
- client: *client0 | ||
events: | ||
- commandStartedEvent: | ||
command: | ||
aggregate: *collection0Name | ||
pipeline: *pipeline | ||
allowDiskUse: true | ||
commandName: aggregate | ||
databaseName: *database0Name |
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