Skip to content

Commit 73a01d1

Browse files
committed
Add unified test for createChangeStream without saveResultAsEntity
1 parent 4a5e58e commit 73a01d1

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

source/unified-test-format/tests/valid-pass/poc-change-streams.json

+36
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,42 @@
9494
}
9595
],
9696
"tests": [
97+
{
98+
"description": "saveResultAsEntity is optional for createChangeStream",
99+
"runOnRequirements": [
100+
{
101+
"minServerVersion": "3.8.0",
102+
"topologies": [
103+
"replicaset"
104+
]
105+
}
106+
],
107+
"operations": [
108+
{
109+
"name": "createChangeStream",
110+
"object": "client0",
111+
"arguments": {
112+
"pipeline": []
113+
}
114+
}
115+
],
116+
"expectEvents": [
117+
{
118+
"client": "client0",
119+
"events": [
120+
{
121+
"commandStartedEvent": {
122+
"command": {
123+
"aggregate": 1
124+
},
125+
"commandName": "aggregate",
126+
"databaseName": "admin"
127+
}
128+
}
129+
]
130+
}
131+
]
132+
},
97133
{
98134
"description": "Executing a watch helper on a MongoClient results in notifications for changes to all collections in all databases in the cluster.",
99135
"runOnRequirements": [

source/unified-test-format/tests/valid-pass/poc-change-streams.yml

+18
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,24 @@ initialData:
5959
documents: []
6060

6161
tests:
62+
- description: "saveResultAsEntity is optional for createChangeStream"
63+
runOnRequirements:
64+
- minServerVersion: "3.8.0"
65+
topologies: [ replicaset ]
66+
operations:
67+
- name: createChangeStream
68+
object: *client0
69+
arguments:
70+
pipeline: []
71+
expectEvents:
72+
- client: *client0
73+
events:
74+
- commandStartedEvent:
75+
command:
76+
aggregate: 1
77+
commandName: aggregate
78+
databaseName: admin
79+
6280
- description: "Executing a watch helper on a MongoClient results in notifications for changes to all collections in all databases in the cluster."
6381
runOnRequirements:
6482
- minServerVersion: "3.8.0"

0 commit comments

Comments
 (0)