| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
set -o errexit # Exit the script with error if any of the commands fail |
| 4 |
|
| 5 |
############################################ |
| 6 |
# Main Program # |
| 7 |
############################################ |
| 8 |
|
| 9 |
# Supported/used environment variables: |
| 10 |
# MONGODB_URI Set the URI, including an optional username/password to use |
| 11 |
# to connect to the server via MONGODB-AWS authentication |
| 12 |
# mechanism. |
| 13 |
|
| 14 |
echo "Running MONGODB-AWS authentication tests" |
| 15 |
|
| 16 |
# Handle credentials and environment setup. |
| 17 |
. $DRIVERS_TOOLS/.evergreen/auth_aws/aws_setup.sh $1 |
| 18 |
|
| 19 |
# show test output |
| 20 |
set -x |
| 21 |
|
| 22 |
# For Go 1.16+, Go builds requires a go.mod file in the current working directory or a parent |
| 23 |
# directory. Spawn a new subshell, "cd" to the project directory, then run "go run". |
| 24 |
(cd ${PROJECT_DIRECTORY} && go run "./cmd/testaws/main.go" | tee test.suite) |