Skip to content

Commit 898070f

Browse files
committed
Add support for v2 CRUD spec tests, $merge, $out tests, $merge support pipelines
GODRIVER-845 GODRIVER-1127 Change-Id: I38bce32e2c5b479fa74db08e6b52395b1cbc81c5
1 parent d92bcdb commit 898070f

11 files changed

+1403
-244
lines changed

data/crud/v2/aggregate-merge.json

Lines changed: 411 additions & 0 deletions
Large diffs are not rendered by default.

data/crud/v2/aggregate-merge.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
data:
2+
- { _id: 1, x: 11 }
3+
- { _id: 2, x: 22 }
4+
- { _id: 3, x: 33 }
5+
6+
minServerVersion: '4.2.0'
7+
8+
collection_name: &collection_name 'test_aggregate_merge'
9+
10+
tests:
11+
-
12+
description: "Aggregate with $merge"
13+
operations:
14+
-
15+
object: collection
16+
name: aggregate
17+
arguments: &arguments
18+
pipeline: &pipeline
19+
- $sort: { x : 1 }
20+
- $match: { _id: { $gt: 1 } }
21+
- $merge: { into: &output_collection "other_test_collection" }
22+
expectations:
23+
-
24+
command_started_event:
25+
command:
26+
aggregate: *collection_name
27+
pipeline: *pipeline
28+
outcome: &outcome
29+
collection:
30+
name: *output_collection
31+
data:
32+
- { _id: 2, x: 22 }
33+
- { _id: 3, x: 33 }
34+
-
35+
description: "Aggregate with $merge and batch size of 0"
36+
operations:
37+
-
38+
object: collection
39+
name: aggregate
40+
arguments:
41+
<<: *arguments
42+
batchSize: 0
43+
expectations:
44+
-
45+
command_started_event:
46+
command:
47+
aggregate: *collection_name
48+
pipeline: *pipeline
49+
cursor: {}
50+
outcome: *outcome
51+
-
52+
description: "Aggregate with $merge and majority readConcern"
53+
operations:
54+
-
55+
object: collection
56+
name: aggregate
57+
collectionOptions:
58+
readConcern: { level: "majority" }
59+
arguments: *arguments
60+
expectations:
61+
-
62+
command_started_event:
63+
command:
64+
aggregate: *collection_name
65+
pipeline: *pipeline
66+
readConcern: { level: "majority" }
67+
outcome: *outcome
68+
-
69+
description: "Aggregate with $merge and local readConcern"
70+
operations:
71+
-
72+
object: collection
73+
name: aggregate
74+
collectionOptions:
75+
readConcern: { level: "local" }
76+
arguments: *arguments
77+
expectations:
78+
-
79+
command_started_event:
80+
command:
81+
aggregate: *collection_name
82+
pipeline: *pipeline
83+
readConcern: { level: "local" }
84+
outcome: *outcome
85+
-
86+
description: "Aggregate with $merge and available readConcern"
87+
operations:
88+
-
89+
object: collection
90+
name: aggregate
91+
collectionOptions:
92+
readConcern: { level: "available" }
93+
arguments: *arguments
94+
expectations:
95+
-
96+
command_started_event:
97+
command:
98+
aggregate: *collection_name
99+
pipeline: *pipeline
100+
readConcern: { level: "available" }
101+
outcome: *outcome

0 commit comments

Comments
 (0)