Skip to content

Commit b70b2e3

Browse files
authored
PHPLIB-1087: Sync collection management tests (mongodb#1068)
* Test on MongoDB 7.0 * Update collection management tests This syncs collection management tests with commit mongodb/specifications@0fa17f3
1 parent a86a1f6 commit b70b2e3

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

.evergreen/config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,10 @@ axes:
713713
display_name: "MongoDB rapid"
714714
variables:
715715
MONGODB_VERSION: "rapid"
716+
- id: "7.0"
717+
display_name: "MongoDB 7.0"
718+
variables:
719+
MONGODB_VERSION: "7.0"
716720
- id: "6.0"
717721
display_name: "MongoDB 6.0"
718722
variables:
@@ -876,7 +880,7 @@ buildvariants:
876880
display_name: "${os}, ${mongodb-versions}, ${php-edge-versions}, ${driver-versions}"
877881
exclude_spec:
878882
# Debian 9.2 only supports up to MongoDB 5.0
879-
- { "os": "debian92", "mongodb-versions": ["6.0", "rapid", "latest"], "php-edge-versions": "latest-stable", "driver-versions": "latest-stable" }
883+
- { "os": "debian92", "mongodb-versions": ["6.0", "7.0", "rapid", "latest"], "php-edge-versions": "latest-stable", "driver-versions": "latest-stable" }
880884
- { "os": "debian11", "mongodb-versions": ["3.6", "4.0", "4.2", "4.4", "5.0"], "php-edge-versions": "latest-stable", "driver-versions": "latest-stable" }
881885
tasks:
882886
- name: "test-standalone"

tests/UnifiedSpecTests/collection-management/timeseries-collection.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,71 @@
250250
]
251251
}
252252
]
253+
},
254+
{
255+
"description": "createCollection with bucketing options",
256+
"runOnRequirements": [
257+
{
258+
"minServerVersion": "7.0"
259+
}
260+
],
261+
"operations": [
262+
{
263+
"name": "dropCollection",
264+
"object": "database0",
265+
"arguments": {
266+
"collection": "test"
267+
}
268+
},
269+
{
270+
"name": "createCollection",
271+
"object": "database0",
272+
"arguments": {
273+
"collection": "test",
274+
"timeseries": {
275+
"timeField": "time",
276+
"bucketMaxSpanSeconds": 3600,
277+
"bucketRoundingSeconds": 3600
278+
}
279+
}
280+
},
281+
{
282+
"name": "assertCollectionExists",
283+
"object": "testRunner",
284+
"arguments": {
285+
"databaseName": "ts-tests",
286+
"collectionName": "test"
287+
}
288+
}
289+
],
290+
"expectEvents": [
291+
{
292+
"client": "client0",
293+
"events": [
294+
{
295+
"commandStartedEvent": {
296+
"command": {
297+
"drop": "test"
298+
},
299+
"databaseName": "ts-tests"
300+
}
301+
},
302+
{
303+
"commandStartedEvent": {
304+
"command": {
305+
"create": "test",
306+
"timeseries": {
307+
"timeField": "time",
308+
"bucketMaxSpanSeconds": 3600,
309+
"bucketRoundingSeconds": 3600
310+
}
311+
},
312+
"databaseName": "ts-tests"
313+
}
314+
}
315+
]
316+
}
317+
]
253318
}
254319
]
255320
}

0 commit comments

Comments
 (0)