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 31, 2023
1 parent 46de146 commit 24b52a4
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 @@ -1234,17 +1234,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 @@ -1160,17 +1160,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 24b52a4

Please sign in to comment.