Skip to content

Commit 24b52a4

Browse files
committed
test: use subprocess
1 parent 46de146 commit 24b52a4

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
@@ -1234,17 +1234,17 @@ tasks:
12341234
- name: "oidc-auth-test-azure-latest"
12351235
commands:
12361236
- func: "install dependencies"
1237-
- command: shell.exec
1237+
- command: subprocess.exec
12381238
params:
1239-
shell: bash
1240-
script: |-
1241-
set -o errexit
1242-
${PREPARE_SHELL}
1243-
cd src
1244-
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
1245-
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
1246-
export AZUREOIDC_TEST_CMD="source ./env.sh && PROVIDER_NAME=azure ./.evergreen/run-oidc-tests.sh"
1247-
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
1239+
working_dir: src
1240+
binary: bash
1241+
env:
1242+
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
1243+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
1244+
AZUREOIDC_CLIENTID: ${testazureoidc_clientid}
1245+
PROVIDER_NAME: azure
1246+
args:
1247+
- .evergreen/run-oidc-tests-azure.sh
12481248

12491249
task_groups:
12501250
- name: serverless_task_group

.evergreen/config.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,17 +1160,17 @@ tasks:
11601160
- name: oidc-auth-test-azure-latest
11611161
commands:
11621162
- func: install dependencies
1163-
- command: shell.exec
1163+
- command: subprocess.exec
11641164
params:
1165-
shell: bash
1166-
script: |-
1167-
set -o errexit
1168-
${PREPARE_SHELL}
1169-
cd src
1170-
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
1171-
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
1172-
export AZUREOIDC_TEST_CMD="source ./env.sh && PROVIDER_NAME=azure ./.evergreen/run-oidc-tests.sh"
1173-
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
1165+
working_dir: src
1166+
binary: bash
1167+
env:
1168+
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
1169+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
1170+
AZUREOIDC_CLIENTID: ${testazureoidc_clientid}
1171+
PROVIDER_NAME: azure
1172+
args:
1173+
- .evergreen/run-oidc-tests-azure.sh
11741174
- name: test-latest-server
11751175
tags:
11761176
- 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)