Skip to content

Commit f5cb670

Browse files
committed
PYTHON-2482 Test Versioned API with a server started with acceptAPIVersion2
1 parent fb4c20a commit f5cb670

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

.evergreen/config.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,18 +1989,25 @@ axes:
19891989
test_pyopenssl: true
19901990
batchtime: 10080 # 7 days
19911991

1992-
- id: requireApiVersion
1993-
display_name: "requireApiVersion"
1992+
- id: versionedApi
1993+
display_name: "versionedApi"
19941994
values:
1995+
# Test against a cluster with requireApiVersion=1.
19951996
- id: "requireApiVersion1"
19961997
display_name: "requireApiVersion1"
1997-
tags: [ "requireApiVersion_tag" ]
1998+
tags: [ "versionedApi_tag" ]
19981999
variables:
19992000
# REQUIRE_API_VERSION is set to make drivers-evergreen-tools
20002001
# start a cluster with the requireApiVersion parameter.
20012002
REQUIRE_API_VERSION: "1"
20022003
# MONGODB_API_VERSION is the apiVersion to use in the test suite.
20032004
MONGODB_API_VERSION: "1"
2005+
# Test against a cluster acceptAPIVersion2 but without requireApiVersion=0.
2006+
- id: "acceptAPIVersion2"
2007+
display_name: "acceptAPIVersion2"
2008+
tags: [ "versionedApi_tag" ]
2009+
variables:
2010+
ORCHESTRATION_FILE: "versioned-api-testing.json"
20042011

20052012
buildvariants:
20062013
- matrix_name: "tests-all"
@@ -2533,8 +2540,9 @@ buildvariants:
25332540
platform: ubuntu-16.04
25342541
python-version: ["3.6", "3.9"]
25352542
auth: "auth"
2536-
requireApiVersion: "*"
2537-
display_name: "requireApiVersion ${python-version}"
2543+
versionedApi: "*"
2544+
display_name: "Versioned API ${versionedApi} ${python-version}"
2545+
batchtime: 10080 # 7 days
25382546
tasks:
25392547
# Versioned API was introduced in MongoDB 4.7
25402548
- "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)