Skip to content

Commit 67567e9

Browse files
committed
PYTHON-2482 Test Versioned API with a server started with acceptAPIVersion2
1 parent 06924cb commit 67567e9

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

.evergreen/config.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2025,18 +2025,25 @@ axes:
20252025
variables:
20262026
SETDEFAULTENCODING: "cp1251"
20272027

2028-
- id: requireApiVersion
2029-
display_name: "requireApiVersion"
2028+
- id: versionedApi
2029+
display_name: "versionedApi"
20302030
values:
2031+
# Test against a cluster with requireApiVersion=1.
20312032
- id: "requireApiVersion1"
20322033
display_name: "requireApiVersion1"
2033-
tags: [ "requireApiVersion_tag" ]
2034+
tags: [ "versionedApi_tag" ]
20342035
variables:
20352036
# REQUIRE_API_VERSION is set to make drivers-evergreen-tools
20362037
# start a cluster with the requireApiVersion parameter.
20372038
REQUIRE_API_VERSION: "1"
20382039
# MONGODB_API_VERSION is the apiVersion to use in the test suite.
20392040
MONGODB_API_VERSION: "1"
2041+
# Test against a cluster acceptAPIVersion2 but without requireApiVersion=0.
2042+
- id: "acceptAPIVersion2"
2043+
display_name: "acceptAPIVersion2"
2044+
tags: [ "versionedApi_tag" ]
2045+
variables:
2046+
ORCHESTRATION_FILE: "versioned-api-testing.json"
20402047

20412048
buildvariants:
20422049
- matrix_name: "tests-all"
@@ -2625,8 +2632,8 @@ buildvariants:
26252632
platform: ubuntu-16.04
26262633
python-version: ["2.7", "3.9"]
26272634
auth: "auth"
2628-
requireApiVersion: "*"
2629-
display_name: "requireApiVersion ${python-version}"
2635+
versionedApi: "*"
2636+
display_name: "Versioned API ${versionedApi} ${python-version}"
26302637
tasks:
26312638
# Versioned API was introduced in MongoDB 4.7
26322639
- "test-latest-standalone"

test/versioned-api/crud-api-version-1-strict.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
},
142142
{
143143
"description": "aggregate on database appends declared API version",
144+
"skipReason": "DRIVERS-1505 $listLocalSessions is not supported in API version 1",
144145
"operations": [
145146
{
146147
"name": "aggregate",

test/versioned-api/test-commands-deprecation-errors.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"minServerVersion": "4.7",
77
"serverParameters": {
88
"enableTestCommands": true,
9-
"acceptAPIVersion2": true
9+
"acceptAPIVersion2": true,
10+
"requireApiVersion": false
1011
}
1112
}
1213
],

0 commit comments

Comments
 (0)