@@ -291,9 +291,10 @@ buildvariants:
291
291
AUTH : auth
292
292
SSL : ssl
293
293
tasks :
294
- - testoidc_task_group
295
- - testazureoidc_task_group
296
- - testgcpoidc_task_group
294
+ - test-oidc-task-group
295
+ - test-azure-oidc-task-group
296
+ - test-gcp-oidc-task-group
297
+ - test-k8s-oidc-task-group
297
298
298
299
- name : oidc-macos
299
300
display_name : " OIDC Macos"
@@ -304,7 +305,7 @@ buildvariants:
304
305
AUTH : auth
305
306
SSL : ssl
306
307
tasks :
307
- - testoidc_task_group
308
+ - test-oidc-task-group
308
309
309
310
- name : oidc-windows
310
311
disable : true
@@ -316,9 +317,9 @@ buildvariants:
316
317
AUTH : auth
317
318
SSL : ssl
318
319
tasks :
319
- - testoidc_task_group
320
- - testazureoidc_task_group
321
- - testgcpoidc_task_group
320
+ - test-oidc-task-group
321
+ - test-azure-oidc-task-group
322
+ - test-gcp-oidc-task-group
322
323
323
324
- name : in-use-encryption
324
325
display_name : " In-Use Encryption"
@@ -636,7 +637,7 @@ task_groups:
636
637
tasks :
637
638
- test-aws-lambda-deployed
638
639
639
- - name : testoidc_task_group
640
+ - name : test-oidc-task-group
640
641
setup_group :
641
642
- func : fetch source
642
643
- func : create expansions
@@ -665,14 +666,15 @@ task_groups:
665
666
tasks :
666
667
- oidc-auth-test-latest
667
668
668
- - name : testazureoidc_task_group
669
+ - name : test-azure-oidc-task-group
669
670
setup_group :
670
671
- func : fetch source
671
672
- func : create expansions
672
673
- func : prepare resources
673
674
- func : fix absolute paths
674
675
- func : init test-results
675
676
- func : make files executable
677
+ - func : install rust
676
678
- command : subprocess.exec
677
679
params :
678
680
binary : bash
@@ -691,14 +693,15 @@ task_groups:
691
693
tasks :
692
694
- oidc-auth-test-azure-latest
693
695
694
- - name : testgcpoidc_task_group
696
+ - name : test-gcp-oidc-task-group
695
697
setup_group :
696
698
- func : fetch source
697
699
- func : create expansions
698
700
- func : prepare resources
699
701
- func : fix absolute paths
700
702
- func : init test-results
701
703
- func : make files executable
704
+ - func : install rust
702
705
- command : subprocess.exec
703
706
params :
704
707
binary : bash
@@ -717,6 +720,31 @@ task_groups:
717
720
tasks :
718
721
- oidc-auth-test-gcp-latest
719
722
723
+ - name : test-k8s-oidc-task-group
724
+ setup_group :
725
+ - func : fetch source
726
+ - func : create expansions
727
+ - func : prepare resources
728
+ - func : fix absolute paths
729
+ - func : init test-results
730
+ - func : make files executable
731
+ - func : install rust
732
+ - command : subprocess.exec
733
+ params :
734
+ binary : bash
735
+ args :
736
+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
737
+ teardown_task :
738
+ - command : subprocess.exec
739
+ params :
740
+ binary : bash
741
+ args :
742
+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/teardown.sh
743
+ setup_group_can_fail_task : true
744
+ setup_group_timeout_secs : 1800
745
+ tasks :
746
+ - oidc-auth-test-k8s-latest
747
+
720
748
- name : happy-eyeballs-task-group
721
749
setup_group_can_fail_task : true
722
750
setup_group_timeout_secs : 1800
@@ -1156,59 +1184,52 @@ tasks:
1156
1184
1157
1185
- name : " oidc-auth-test-azure-latest"
1158
1186
commands :
1159
- - command : shell.exec
1187
+ - func : " build static test tarball"
1188
+ vars :
1189
+ BUILD_FEATURES : " --features azure-oidc"
1190
+ - command : subprocess.exec
1191
+ type : test
1160
1192
params :
1161
1193
working_dir : src
1162
- shell : bash
1163
- script : |-
1164
- set -o errexit
1165
- ${PREPARE_SHELL}
1166
- ./.evergreen/install-dependencies.sh rust
1167
- source .cargo/env
1168
- export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/mongo-rust-driver.tar
1169
- rustup default stable
1170
- export RUSTFLAGS="-C target-feature=+crt-static"
1171
- cargo test --features azure-oidc --target x86_64-unknown-linux-gnu get_exe_name -- --ignored
1172
- export TEST_FILE=$(cat exe_name.txt)
1173
- rm "$AZUREOIDC_DRIVERS_TAR_FILE" || true
1174
- tar -cf $AZUREOIDC_DRIVERS_TAR_FILE $TEST_FILE
1175
- tar -uf $AZUREOIDC_DRIVERS_TAR_FILE ./.evergreen
1176
- rm "$AZUREOIDC_DRIVERS_TAR_FILE".gz || true
1177
- gzip $AZUREOIDC_DRIVERS_TAR_FILE
1178
- export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/mongo-rust-driver.tar.gz
1179
- # Define the command to run on the azure VM.
1180
- # Ensure that we source the environment file created for us, set up any other variables we need,
1181
- # and then run our test suite on the vm.
1182
- export AZUREOIDC_TEST_CMD="ls -laR data && PROJECT_DIRECTORY='.' OIDC_ENV=azure OIDC=oidc TEST_FILE=./$TEST_FILE ./.evergreen/run-mongodb-oidc-test.sh"
1183
- bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
1194
+ binary : bash
1195
+ args :
1196
+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/run-driver-test.sh
1197
+ env :
1198
+ AZUREOIDC_DRIVERS_TAR_FILE : ${STATIC_TEST_TARBALL}
1199
+ AZUREOIDC_TEST_CMD : " ls -laR data && PROJECT_DIRECTORY='.' OIDC_ENV=azure OIDC=oidc TEST_FILE=./${STATIC_TEST_BINARY} ./.evergreen/run-mongodb-oidc-test.sh"
1184
1200
1185
1201
- name : " oidc-auth-test-gcp-latest"
1186
1202
commands :
1187
- - command : shell.exec
1203
+ - func : " build static test tarball"
1204
+ vars :
1205
+ BUILD_FEATURES : " --features gcp-oidc"
1206
+ - command : subprocess.exec
1207
+ type : test
1188
1208
params :
1189
1209
working_dir : src
1190
- shell : bash
1191
- script : |-
1192
- set -o errexit
1193
- ${PREPARE_SHELL}
1194
- ./.evergreen/install-dependencies.sh rust
1195
- source .cargo/env
1196
- export GCPOIDC_DRIVERS_TAR_FILE=/tmp/mongo-rust-driver.tar
1197
- rustup default stable
1198
- export RUSTFLAGS="-C target-feature=+crt-static"
1199
- cargo test --features gcp-oidc --target x86_64-unknown-linux-gnu test::atlas_planned_maintenance_testing::get_exe_name -- --ignored
1200
- export TEST_FILE=$(cat exe_name.txt)
1201
- rm "$GCPOIDC_DRIVERS_TAR_FILE" || true
1202
- tar -cf $GCPOIDC_DRIVERS_TAR_FILE $TEST_FILE
1203
- tar -uf $GCPOIDC_DRIVERS_TAR_FILE ./.evergreen
1204
- rm "$GCPOIDC_DRIVERS_TAR_FILE".gz || true
1205
- gzip $GCPOIDC_DRIVERS_TAR_FILE
1206
- export GCPOIDC_DRIVERS_TAR_FILE=/tmp/mongo-rust-driver.tar.gz
1207
- # Define the command to run on the gcp VM.
1208
- # Ensure that we source the environment file created for us, set up any other variables we need,
1209
- # and then run our test suite on the vm.
1210
- export GCPOIDC_TEST_CMD="ls -la && PROJECT_DIRECTORY='.' OIDC_ENV=gcp OIDC=oidc TEST_FILE=./$TEST_FILE ./.evergreen/run-mongodb-oidc-test.sh"
1211
- bash $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/run-driver-test.sh
1210
+ binary : bash
1211
+ args :
1212
+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/run-driver-test.sh
1213
+ env :
1214
+ GCPOIDC_DRIVERS_TAR_FILE : ${STATIC_TEST_TARBALL}
1215
+ GCPOIDC_TEST_CMD : " ls -la && PROJECT_DIRECTORY='.' OIDC_ENV=gcp OIDC=oidc TEST_FILE=./${STATIC_TEST_BINARY} ./.evergreen/run-mongodb-oidc-test.sh"
1216
+
1217
+ - name : " oidc-auth-test-k8s-latest"
1218
+ commands :
1219
+ - func : " build static test tarball"
1220
+ - command : ec2.assume_role
1221
+ params :
1222
+ role_arn : ${aws_test_secrets_role}
1223
+ duration_seconds : 1800
1224
+ - func : " run oidc k8s test"
1225
+ vars :
1226
+ VARIANT : eks
1227
+ - func : " run oidc k8s test"
1228
+ vars :
1229
+ VARIANT : gke
1230
+ - func : " run oidc k8s test"
1231
+ vars :
1232
+ VARIANT : aks
1212
1233
1213
1234
- name : " test-happy-eyeballs"
1214
1235
commands :
@@ -1925,3 +1946,56 @@ functions:
1925
1946
- command : attach.xunit_results
1926
1947
params :
1927
1948
file : src/results.xml
1949
+
1950
+ " build static test tarball " :
1951
+ - command : subprocess.exec
1952
+ params :
1953
+ working_dir : src
1954
+ binary : bash
1955
+ args :
1956
+ - .evergreen/build-static-test-tarball.sh
1957
+ include_expansions_in_env :
1958
+ - PROJECT_DIRECTORY
1959
+ - BUILD_FEATURES
1960
+ - command : expansions.update
1961
+ params :
1962
+ file : src/static-test-tarball-expansion.yml
1963
+
1964
+ " run oidc k8s test " :
1965
+ - command : subprocess.exec
1966
+ params :
1967
+ working_dir : src
1968
+ binary : bash
1969
+ args :
1970
+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup-pod.sh
1971
+ env :
1972
+ K8S_VARIANT : ${VARIANT}
1973
+ include_expansions_in_env :
1974
+ - AWS_ACCESS_KEY_ID
1975
+ - AWS_SECRET_ACCESS_KEY
1976
+ - AWS_SESSION_TOKEN
1977
+ - DRIVERS_TOOLS
1978
+ - command : subprocess.exec
1979
+ type : test
1980
+ params :
1981
+ working_dir : src
1982
+ binary : bash
1983
+ args :
1984
+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/run-driver-test.sh
1985
+ env :
1986
+ K8S_DRIVERS_TAR_FILE : ${STATIC_TEST_TARBALL}
1987
+ K8S_TEST_CMD : " ls -la && PROJECT_DIRECTORY='.' OIDC_ENV=k8s OIDC=oidc TEST_FILE=./${STATIC_TEST_BINARY} ./.evergreen/run-mongodb-oidc-test.sh"
1988
+ include_expansions_in_env :
1989
+ - AWS_ACCESS_KEY_ID
1990
+ - AWS_SECRET_ACCESS_KEY
1991
+ - AWS_SESSION_TOKEN
1992
+ - command : subprocess.exec
1993
+ params :
1994
+ working_dir : src
1995
+ binary : bash
1996
+ args :
1997
+ - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/teardown-pod.sh
1998
+ include_expansions_in_env :
1999
+ - AWS_ACCESS_KEY_ID
2000
+ - AWS_SECRET_ACCESS_KEY
2001
+ - AWS_SESSION_TOKEN
0 commit comments