| 1 |
#!/usr/bin/env bash |
| 2 |
# run-awskms-test |
| 3 |
# Runs the awskms test. |
| 4 |
|
| 5 |
echo "Building build-kms-test ... begin" |
| 6 |
BUILD_TAGS="-tags=cse" \ |
| 7 |
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \ |
| 8 |
make build-kms-test |
| 9 |
echo "Building build-kms-test ... end" |
| 10 |
|
| 11 |
. ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas_connect |
| 12 |
export MONGODB_URI="$ATLAS_FREE" |
| 13 |
|
| 14 |
if [ -z "${EXPECT_ERROR:-}" ]; then |
| 15 |
. ${DRIVERS_TOOLS}/.evergreen/csfle/setup-secrets.sh |
| 16 |
export AWS_SECRET_ACCESS_KEY=$FLE_AWS_SECRET_ACCESS_KEY |
| 17 |
export AWS_ACCESS_KEY_ID=$FLE_AWS_ACCESS_KEY_ID |
| 18 |
fi |
| 19 |
|
| 20 |
# AWS_SESSION_TOKEN is required to get credentials from the drivers/csfle vault |
| 21 |
# but interferes with the testkms binary causing UnrecognizedClientException. |
| 22 |
unset AWS_SESSION_TOKEN |
| 23 |
|
| 24 |
LD_LIBRARY_PATH=./install/libmongocrypt/lib64 PROVIDER='aws' ./testkms |