Skip to content

Commit b0614b4

Browse files
CSHARP-3450: Versioned API database aggregation test only works on 4.9+ servers. (#480)
1 parent 184dc46 commit b0614b4

12 files changed

+388
-77
lines changed

tests/MongoDB.Driver.Tests/Specifications/versioned-api/tests/crud-api-version-1-strict.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"schemaVersion": "1.1",
44
"runOnRequirements": [
55
{
6-
"minServerVersion": "4.7"
6+
"minServerVersion": "4.9"
77
}
88
],
99
"createEntities": [
@@ -608,12 +608,6 @@
608608
},
609609
{
610610
"description": "estimatedDocumentCount appends declared API version",
611-
"skipReason": "DRIVERS-1561 collStats is not in API version 1",
612-
"runOnRequirements": [
613-
{
614-
"minServerVersion": "4.9.0"
615-
}
616-
],
617611
"operations": [
618612
{
619613
"name": "estimatedDocumentCount",

tests/MongoDB.Driver.Tests/Specifications/versioned-api/tests/crud-api-version-1-strict.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: "CRUD Api Version 1 (strict)"
33
schemaVersion: "1.1"
44

55
runOnRequirements:
6-
- minServerVersion: "4.7"
6+
- minServerVersion: "4.9"
77

88
createEntities:
99
- client:
@@ -225,9 +225,6 @@ tests:
225225
<<: *expectedApiVersion
226226

227227
- description: "estimatedDocumentCount appends declared API version"
228-
skipReason: "DRIVERS-1561 collStats is not in API version 1"
229-
runOnRequirements:
230-
- minServerVersion: "4.9.0" # $collStats is not used in estimatedDocumentCount on < 4.9
231228
operations:
232229
- name: estimatedDocumentCount
233230
object: *collection

tests/MongoDB.Driver.Tests/Specifications/versioned-api/tests/crud-api-version-1.json

+1-40
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"schemaVersion": "1.1",
44
"runOnRequirements": [
55
{
6-
"minServerVersion": "4.7"
6+
"minServerVersion": "4.9"
77
}
88
],
99
"createEntities": [
@@ -598,47 +598,8 @@
598598
}
599599
]
600600
},
601-
{
602-
"description": "estimatedDocumentCount appends declared API version on less than 4.9.0",
603-
"runOnRequirements": [
604-
{
605-
"maxServerVersion": "4.8.99"
606-
}
607-
],
608-
"operations": [
609-
{
610-
"name": "estimatedDocumentCount",
611-
"object": "collection",
612-
"arguments": {}
613-
}
614-
],
615-
"expectEvents": [
616-
{
617-
"client": "client",
618-
"events": [
619-
{
620-
"commandStartedEvent": {
621-
"command": {
622-
"count": "test",
623-
"apiVersion": "1",
624-
"apiStrict": {
625-
"$$unsetOrMatches": false
626-
},
627-
"apiDeprecationErrors": true
628-
}
629-
}
630-
}
631-
]
632-
}
633-
]
634-
},
635601
{
636602
"description": "estimatedDocumentCount appends declared API version on 4.9.0 or greater",
637-
"runOnRequirements": [
638-
{
639-
"minServerVersion": "4.9.0"
640-
}
641-
],
642603
"operations": [
643604
{
644605
"name": "estimatedDocumentCount",

tests/MongoDB.Driver.Tests/Specifications/versioned-api/tests/crud-api-version-1.yml

+1-18
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: "CRUD Api Version 1"
33
schemaVersion: "1.1"
44

55
runOnRequirements:
6-
- minServerVersion: "4.7"
6+
- minServerVersion: "4.9"
77

88
createEntities:
99
- client:
@@ -218,24 +218,7 @@ tests:
218218
key: x
219219
<<: *expectedApiVersion
220220

221-
- description: "estimatedDocumentCount appends declared API version on less than 4.9.0"
222-
runOnRequirements:
223-
- maxServerVersion: "4.8.99"
224-
operations:
225-
- name: estimatedDocumentCount
226-
object: *collection
227-
arguments: {}
228-
expectEvents:
229-
- client: *client
230-
events:
231-
- commandStartedEvent:
232-
command:
233-
count: *collectionName
234-
<<: *expectedApiVersion
235-
236221
- description: "estimatedDocumentCount appends declared API version on 4.9.0 or greater"
237-
runOnRequirements:
238-
- minServerVersion: "4.9.0"
239222
operations:
240223
- name: estimatedDocumentCount
241224
object: *collection

tests/MongoDB.Driver.Tests/Specifications/versioned-api/tests/runcommand-helper-no-api-version-declared.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"schemaVersion": "1.1",
44
"runOnRequirements": [
55
{
6-
"minServerVersion": "4.7",
6+
"minServerVersion": "4.9",
77
"serverParameters": {
88
"requireApiVersion": false
99
}

tests/MongoDB.Driver.Tests/Specifications/versioned-api/tests/runcommand-helper-no-api-version-declared.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: "RunCommand helper: No API version declared"
33
schemaVersion: "1.1"
44

55
runOnRequirements:
6-
- minServerVersion: "4.7"
6+
- minServerVersion: "4.9"
77
serverParameters:
88
requireApiVersion: false
99

tests/MongoDB.Driver.Tests/Specifications/versioned-api/tests/test-commands-deprecation-errors.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"schemaVersion": "1.1",
44
"runOnRequirements": [
55
{
6-
"minServerVersion": "4.7",
6+
"minServerVersion": "4.9",
77
"serverParameters": {
88
"enableTestCommands": true,
99
"acceptAPIVersion2": true,

tests/MongoDB.Driver.Tests/Specifications/versioned-api/tests/test-commands-deprecation-errors.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: "Test commands: deprecation errors"
33
schemaVersion: "1.1"
44

55
runOnRequirements:
6-
- minServerVersion: "4.7"
6+
- minServerVersion: "4.9"
77
serverParameters:
88
enableTestCommands: true
99
acceptAPIVersion2: true

tests/MongoDB.Driver.Tests/Specifications/versioned-api/tests/test-commands-strict-mode.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"schemaVersion": "1.1",
44
"runOnRequirements": [
55
{
6-
"minServerVersion": "4.7",
6+
"minServerVersion": "4.9",
77
"serverParameters": {
88
"enableTestCommands": true
99
}

tests/MongoDB.Driver.Tests/Specifications/versioned-api/tests/test-commands-strict-mode.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: "Test commands: strict mode"
33
schemaVersion: "1.1"
44

55
runOnRequirements:
6-
- minServerVersion: "4.7"
6+
- minServerVersion: "4.9"
77
serverParameters:
88
enableTestCommands: true
99

0 commit comments

Comments
 (0)