Skip to content

Commit c40e801

Browse files
committed
test: use subprocess
1 parent eb09946 commit c40e801

File tree

3 files changed

+31
-20
lines changed

3 files changed

+31
-20
lines changed

.evergreen/config.in.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,17 +1225,17 @@ tasks:
12251225
- name: "oidc-auth-test-azure-latest"
12261226
commands:
12271227
- func: "install dependencies"
1228-
- command: shell.exec
1228+
- command: subprocess.exec
12291229
params:
1230-
shell: bash
1231-
script: |-
1232-
set -o errexit
1233-
${PREPARE_SHELL}
1234-
cd src
1235-
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
1236-
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
1237-
export AZUREOIDC_TEST_CMD="source ./env.sh && PROVIDER_NAME=azure ./.evergreen/run-oidc-tests.sh"
1238-
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
1230+
working_dir: src
1231+
binary: bash
1232+
env:
1233+
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
1234+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
1235+
AZUREOIDC_CLIENTID: ${testazureoidc_clientid}
1236+
PROVIDER_NAME: azure
1237+
args:
1238+
- .evergreen/run-oidc-tests-azure.sh
12391239

12401240
task_groups:
12411241
- name: serverless_task_group

.evergreen/config.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,17 +1152,17 @@ tasks:
11521152
- name: oidc-auth-test-azure-latest
11531153
commands:
11541154
- func: install dependencies
1155-
- command: shell.exec
1155+
- command: subprocess.exec
11561156
params:
1157-
shell: bash
1158-
script: |-
1159-
set -o errexit
1160-
${PREPARE_SHELL}
1161-
cd src
1162-
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
1163-
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
1164-
export AZUREOIDC_TEST_CMD="source ./env.sh && PROVIDER_NAME=azure ./.evergreen/run-oidc-tests.sh"
1165-
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
1157+
working_dir: src
1158+
binary: bash
1159+
env:
1160+
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
1161+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
1162+
AZUREOIDC_CLIENTID: ${testazureoidc_clientid}
1163+
PROVIDER_NAME: azure
1164+
args:
1165+
- .evergreen/run-oidc-tests-azure.sh
11661166
- name: test-latest-server
11671167
tags:
11681168
- latest

.evergreen/run-oidc-tests-azure.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
set -o xtrace # Write all commands first to stderr
3+
set -o errexit # Exit the script with error if any of the commands fail
4+
5+
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
6+
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
7+
export AZUREOIDC_TEST_CMD="source ./env.sh && PROVIDER_NAME=azure ./.evergreen/run-oidc-tests.sh"
8+
export AZUREOIDC_CLIENTID=$AZUREOIDC_CLIENTID
9+
export PROJECT_DIRECTORY=$PROJECT_DIRECTORY
10+
export PROVIDER_NAME=$PROVIDER_NAME
11+
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh

0 commit comments

Comments
 (0)