Skip to content

Commit

Permalink
test: use subprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed May 30, 2023
1 parent 59f5b0d commit 453008b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 20 deletions.
20 changes: 10 additions & 10 deletions .evergreen/config.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1218,17 +1218,17 @@ tasks:
- name: "oidc-auth-test-azure-latest"
commands:
- func: "install dependencies"
- command: shell.exec
- command: subprocess.exec
params:
shell: bash
script: |-
set -o errexit
${PREPARE_SHELL}
cd src
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
export AZUREOIDC_TEST_CMD="source ./env.sh && PROVIDER_NAME=azure ./.evergreen/run-oidc-tests.sh"
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
working_dir: src
binary: bash
env:
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
AZUREOIDC_CLIENTID: ${testazureoidc_clientid}
PROVIDER_NAME: azure
args:
- .evergreen/run-oidc-tests-azure.sh

task_groups:
- name: serverless_task_group
Expand Down
20 changes: 10 additions & 10 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1145,17 +1145,17 @@ tasks:
- name: oidc-auth-test-azure-latest
commands:
- func: install dependencies
- command: shell.exec
- command: subprocess.exec
params:
shell: bash
script: |-
set -o errexit
${PREPARE_SHELL}
cd src
export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
export AZUREOIDC_TEST_CMD="source ./env.sh && PROVIDER_NAME=azure ./.evergreen/run-oidc-tests.sh"
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh
working_dir: src
binary: bash
env:
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
AZUREOIDC_CLIENTID: ${testazureoidc_clientid}
PROVIDER_NAME: azure
args:
- .evergreen/run-oidc-tests-azure.sh
- name: test-latest-server
tags:
- latest
Expand Down
11 changes: 11 additions & 0 deletions .evergreen/run-oidc-tests-azure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -o xtrace # Write all commands first to stderr
set -o errexit # Exit the script with error if any of the commands fail

export AZUREOIDC_DRIVERS_TAR_FILE=/tmp/node-mongodb-native.tgz
tar czf $AZUREOIDC_DRIVERS_TAR_FILE .
export AZUREOIDC_TEST_CMD="source ./env.sh && PROVIDER_NAME=azure ./.evergreen/run-oidc-tests.sh"
export AZUREOIDC_CLIENTID=$AZUREOIDC_CLIENTID
export PROJECT_DIRECTORY=$PROJECT_DIRECTORY
export PROVIDER_NAME=$PROVIDER_NAME
bash $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/run-driver-test.sh

0 comments on commit 453008b

Please sign in to comment.