Skip to content

Commit 453008b

Browse files
committed
test: use subprocess
1 parent 59f5b0d commit 453008b

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
@@ -1218,17 +1218,17 @@ tasks:
12181218
- name: "oidc-auth-test-azure-latest"
12191219
commands:
12201220
- func: "install dependencies"
1221-
- command: shell.exec
1221+
- command: subprocess.exec
12221222
params:
1223-
shell: bash
1224-
script: |-
1225-
set -o errexit
1226-
${PREPARE_SHELL}
1227-
cd src
1228-
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
1229-
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
1230-
export AZUREOIDC_TEST_CMD="source ./env.sh && PROVIDER_NAME=azure ./.evergreen/run-oidc-tests.sh"
1231-
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
1223+
working_dir: src
1224+
binary: bash
1225+
env:
1226+
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
1227+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
1228+
AZUREOIDC_CLIENTID: ${testazureoidc_clientid}
1229+
PROVIDER_NAME: azure
1230+
args:
1231+
- .evergreen/run-oidc-tests-azure.sh
12321232

12331233
task_groups:
12341234
- name: serverless_task_group

.evergreen/config.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,17 +1145,17 @@ tasks:
11451145
- name: oidc-auth-test-azure-latest
11461146
commands:
11471147
- func: install dependencies
1148-
- command: shell.exec
1148+
- command: subprocess.exec
11491149
params:
1150-
shell: bash
1151-
script: |-
1152-
set -o errexit
1153-
${PREPARE_SHELL}
1154-
cd src
1155-
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
1156-
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
1157-
export AZUREOIDC_TEST_CMD="source ./env.sh && PROVIDER_NAME=azure ./.evergreen/run-oidc-tests.sh"
1158-
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
1150+
working_dir: src
1151+
binary: bash
1152+
env:
1153+
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
1154+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
1155+
AZUREOIDC_CLIENTID: ${testazureoidc_clientid}
1156+
PROVIDER_NAME: azure
1157+
args:
1158+
- .evergreen/run-oidc-tests-azure.sh
11591159
- name: test-latest-server
11601160
tags:
11611161
- 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)