Skip to content

Commit 30a43fe

Browse files
committed
PYTHON-2453 Add requireApiVersion tests
1 parent 7f903be commit 30a43fe

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.evergreen/config.yml

+29
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ functions:
290290
STORAGE_ENGINE=${STORAGE_ENGINE} \
291291
DISABLE_TEST_COMMANDS=${DISABLE_TEST_COMMANDS} \
292292
ORCHESTRATION_FILE=${ORCHESTRATION_FILE} \
293+
REQUIRE_API_VERSION=${REQUIRE_API_VERSION} \
293294
sh ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
294295
# run-orchestration generates expansion file with the MONGODB_URI for the cluster
295296
- command: expansions.update
@@ -425,6 +426,7 @@ functions:
425426
AUTH=${AUTH} \
426427
SSL=${SSL} \
427428
DATA_LAKE=${DATA_LAKE} \
429+
MONGODB_API_VERSION=${MONGODB_API_VERSION} \
428430
sh ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
429431
430432
"run enterprise auth tests":
@@ -1184,6 +1186,13 @@ tasks:
11841186
vars:
11851187
DATA_LAKE: "true"
11861188

1189+
- name: versioned-api-tests
1190+
commands:
1191+
- func: "bootstrap data lake"
1192+
- func: "run tests"
1193+
vars:
1194+
DATA_LAKE: "true"
1195+
11871196
- name: test-ocsp-rsa-valid-cert-server-staples
11881197
tags: ["ocsp", "ocsp-rsa", "ocsp-staple"]
11891198
commands:
@@ -2002,6 +2011,16 @@ axes:
20022011
variables:
20032012
SETDEFAULTENCODING: "cp1251"
20042013

2014+
- id: requireApiVersion
2015+
display_name: "requireApiVersion"
2016+
values:
2017+
- id: "requireApiVersion"
2018+
display_name: "requireApiVersion"
2019+
tags: [ "requireApiVersion_tag" ]
2020+
variables:
2021+
REQUIRE_API_VERSION: "1"
2022+
MONGODB_API_VERSION: "1"
2023+
20052024
buildvariants:
20062025
- matrix_name: "tests-all"
20072026
matrix_spec:
@@ -2584,6 +2603,16 @@ buildvariants:
25842603
tasks:
25852604
- name: atlas-data-lake-tests
25862605

2606+
- matrix_name: "versioned-api-tests"
2607+
matrix_spec:
2608+
platform: ubuntu-16.04
2609+
python-version: ["2.7", "3.9"]
2610+
auth: "auth"
2611+
requireApiVersion: "*"
2612+
display_name: "requireApiVersion ${python-version}"
2613+
tasks:
2614+
- "test-latest-standalone"
2615+
25872616
- matrix_name: "ocsp-test"
25882617
matrix_spec:
25892618
platform: ubuntu-16.04

.evergreen/run-tests.sh

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ GREEN_FRAMEWORK=${GREEN_FRAMEWORK:-}
2626
C_EXTENSIONS=${C_EXTENSIONS:-}
2727
COVERAGE=${COVERAGE:-}
2828
COMPRESSORS=${COMPRESSORS:-}
29+
MONGODB_API_VERSION=${MONGODB_API_VERSION:-}
2930
TEST_ENCRYPTION=${TEST_ENCRYPTION:-}
3031
LIBMONGOCRYPT_URL=${LIBMONGOCRYPT_URL:-}
3132
SETDEFAULTENCODING=${SETDEFAULTENCODING:-}
@@ -35,6 +36,11 @@ if [ -n "$COMPRESSORS" ]; then
3536
export COMPRESSORS=$COMPRESSORS
3637
fi
3738

39+
if [ -n "$MONGODB_API_VERSION" ]; then
40+
export MONGODB_API_VERSION=$MONGODB_API_VERSION
41+
fi
42+
43+
3844
export JAVA_HOME=/opt/java/jdk8
3945

4046
if [ "$AUTH" != "noauth" ]; then

0 commit comments

Comments
 (0)