Skip to content

Commit 384eaa1

Browse files
committed
test: use subprocess
1 parent 236a64c commit 384eaa1

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
@@ -1247,17 +1247,17 @@ tasks:
12471247
- name: "oidc-auth-test-azure-latest"
12481248
commands:
12491249
- func: "install dependencies"
1250-
- command: shell.exec
1250+
- command: subprocess.exec
12511251
params:
1252-
shell: bash
1253-
script: |-
1254-
set -o errexit
1255-
${PREPARE_SHELL}
1256-
cd src
1257-
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
1258-
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
1259-
export AZUREOIDC_TEST_CMD="source ./env.sh && PROVIDER_NAME=azure ./.evergreen/run-oidc-tests.sh"
1260-
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
1252+
working_dir: src
1253+
binary: bash
1254+
env:
1255+
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
1256+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
1257+
AZUREOIDC_CLIENTID: ${testazureoidc_clientid}
1258+
PROVIDER_NAME: azure
1259+
args:
1260+
- .evergreen/run-oidc-tests-azure.sh
12611261

12621262
task_groups:
12631263
- name: serverless_task_group

.evergreen/config.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,17 +1171,17 @@ tasks:
11711171
- name: oidc-auth-test-azure-latest
11721172
commands:
11731173
- func: install dependencies
1174-
- command: shell.exec
1174+
- command: subprocess.exec
11751175
params:
1176-
shell: bash
1177-
script: |-
1178-
set -o errexit
1179-
${PREPARE_SHELL}
1180-
cd src
1181-
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
1182-
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
1183-
export AZUREOIDC_TEST_CMD="source ./env.sh && PROVIDER_NAME=azure ./.evergreen/run-oidc-tests.sh"
1184-
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
1176+
working_dir: src
1177+
binary: bash
1178+
env:
1179+
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
1180+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
1181+
AZUREOIDC_CLIENTID: ${testazureoidc_clientid}
1182+
PROVIDER_NAME: azure
1183+
args:
1184+
- .evergreen/run-oidc-tests-azure.sh
11851185
- name: test-latest-server
11861186
tags:
11871187
- 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)