Skip to content

Commit

Permalink
test(NODE-3606): legacy and new versions of the CSFLE library (#3002)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken authored Oct 14, 2021
1 parent 7c5a7bb commit 564b0d7
Showing 3 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .evergreen/config.yml
Original file line number Diff line number Diff line change
@@ -206,7 +206,7 @@ functions:
script: |
KRB5_KEYTAB='${gssapi_auth_keytab_base64}' KRB5_PRINCIPAL='${gssapi_auth_principal}' \
MONGODB_URI='${gssapi_auth_mongodb_uri}' UNIFIED=${UNIFIED} \
NODE_LTS_NAME='${NODE_LTS_NAME}' bash ${PROJECT_DIRECTORY}/.evergreen/run-kerberos-tests.sh
NODE_LTS_NAME='${NODE_LTS_NAME}' NODE_VERSION=${NODE_VERSION} bash ${PROJECT_DIRECTORY}/.evergreen/run-kerberos-tests.sh
run ldap tests:
- command: shell.exec
type: test
11 changes: 10 additions & 1 deletion .evergreen/run-kerberos-tests.sh
Original file line number Diff line number Diff line change
@@ -22,7 +22,16 @@ fi
echo "Running kinit"
kinit -k -t "$(pwd)/.evergreen/drivers.keytab" -p ${KRB5_PRINCIPAL}

npm install kerberos
set -o xtrace
if [ -z ${NODE_VERSION+omitted} ]; then echo "NODE_VERSION is unset" && exit 1; fi
NODE_MAJOR_VERSION=$(echo "$NODE_VERSION" | cut -d. -f1)
if [[ $NODE_MAJOR_VERSION -ge 12 ]]; then
npm install kerberos@">=2.0.0-beta.0"
else
npm install kerberos@"^1.1.7"
fi
set +o xtrace

npm run check:kerberos

# destroy ticket
10 changes: 7 additions & 3 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# set -o xtrace # Write all commands first to stderr
set -o errexit # Exit the script with error if any of the commands fail

@@ -52,8 +52,12 @@ if [[ -z "${CLIENT_ENCRYPTION}" ]]; then
unset AWS_ACCESS_KEY_ID;
unset AWS_SECRET_ACCESS_KEY;
else
npm install mongodb-client-encryption@latest

NODE_MAJOR_VERSION=$(echo $NODE_VERSION | cut -d. -f1)
if [[ $NODE_MAJOR_VERSION -ge 12 ]]; then
npm install mongodb-client-encryption@">=2.0.0-beta.0"
else
npm install mongodb-client-encryption@"^1.2.7"
fi
# Get access to the AWS temporary credentials:
echo "adding temporary AWS credentials to environment"
# CSFLE_AWS_TEMP_ACCESS_KEY_ID, CSFLE_AWS_TEMP_SECRET_ACCESS_KEY, CSFLE_AWS_TEMP_SESSION_TOKEN

0 comments on commit 564b0d7

Please sign in to comment.