...
1description: aggregate-allowdiskuse
2
3schemaVersion: '1.0'
4
5createEntities:
6 - client:
7 id: &client0 client0
8 observeEvents: [ commandStartedEvent ]
9 - database:
10 id: &database0 database0
11 client: *client0
12 databaseName: &database0Name crud-tests
13 - collection:
14 id: &collection0 collection0
15 database: *database0
16 collectionName: &collection0Name coll0
17
18initialData:
19 - collectionName: *collection0Name
20 databaseName: *database0Name
21 documents: []
22
23tests:
24 - description: 'Aggregate does not send allowDiskUse when value is not specified'
25 operations:
26 - object: *collection0
27 name: aggregate
28 arguments:
29 pipeline: &pipeline [ { $match: {} } ]
30 expectEvents:
31 - client: *client0
32 events:
33 - commandStartedEvent:
34 command:
35 aggregate: *collection0Name
36 pipeline: *pipeline
37 allowDiskUse: { $$exists: false }
38 commandName: aggregate
39 databaseName: *database0Name
40
41 - description: 'Aggregate sends allowDiskUse false when false is specified'
42 operations:
43 - object: *collection0
44 name: aggregate
45 arguments:
46 pipeline: *pipeline
47 allowDiskUse: false
48 expectEvents:
49 - client: *client0
50 events:
51 - commandStartedEvent:
52 command:
53 aggregate: *collection0Name
54 pipeline: *pipeline
55 allowDiskUse: false
56 commandName: aggregate
57 databaseName: *database0Name
58
59 - description: 'Aggregate sends allowDiskUse true when true is specified'
60 operations:
61 - object: *collection0
62 name: aggregate
63 arguments:
64 pipeline: *pipeline
65 allowDiskUse: true
66 expectEvents:
67 - client: *client0
68 events:
69 - commandStartedEvent:
70 command:
71 aggregate: *collection0Name
72 pipeline: *pipeline
73 allowDiskUse: true
74 commandName: aggregate
75 databaseName: *database0Name
View as plain text