diff --git a/test/spec/crud/unified/aggregate-allowdiskuse.json b/test/spec/crud/unified/aggregate-allowdiskuse.json new file mode 100644 index 0000000000..6d794d1e4d --- /dev/null +++ b/test/spec/crud/unified/aggregate-allowdiskuse.json @@ -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" + } + } + ] + } + ] + } + ] + } diff --git a/test/spec/crud/unified/aggregate-allowdiskuse.yml b/test/spec/crud/unified/aggregate-allowdiskuse.yml new file mode 100644 index 0000000000..d9d2556205 --- /dev/null +++ b/test/spec/crud/unified/aggregate-allowdiskuse.yml @@ -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 diff --git a/test/spec/crud/unified/find-allowdiskuse.json b/test/spec/crud/unified/find-allowdiskuse.json index 789bb7fbf1..eb238ab93a 100644 --- a/test/spec/crud/unified/find-allowdiskuse.json +++ b/test/spec/crud/unified/find-allowdiskuse.json @@ -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", @@ -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", diff --git a/test/spec/crud/unified/find-allowdiskuse.yml b/test/spec/crud/unified/find-allowdiskuse.yml index b2de4037dc..1bf8eee562 100644 --- a/test/spec/crud/unified/find-allowdiskuse.yml +++ b/test/spec/crud/unified/find-allowdiskuse.yml @@ -24,7 +24,7 @@ createEntities: collectionName: &collection_name test_find_allowdiskuse 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 @@ -42,7 +42,7 @@ tests: allowDiskUse: $$exists: false - - description: 'Find sends allowDiskuse false when false is specified' + description: 'Find sends allowDiskUse false when false is specified' operations: - object: *collection0