From c303425ce36982e80b9d4dbbdf6ee7b0f9a7d990 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Tue, 26 Jul 2022 14:32:39 +0200 Subject: [PATCH 01/10] test(NODE-4463): download shared lib in evergreen --- .evergreen/config.in.yml | 60 ++++++++++++++++++++++++++++ .evergreen/config.yml | 59 +++++++++++++++++++++++++++ .evergreen/run-custom-csfle-tests.sh | 5 +++ 3 files changed, 124 insertions(+) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 38d96393372..9557f04e8d7 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -789,6 +789,66 @@ functions: MONGODB_URI="${MONGODB_URI}" bash ${PROJECT_DIRECTORY}/.evergreen/run-custom-csfle-tests.sh + "run custom csfle shared lib tests": + - command: shell.exec + type: test + params: + silent: true + working_dir: "src" + script: | + ${PREPARE_SHELL} + cat < prepare_client_encryption.sh + export CLIENT_ENCRYPTION=${CLIENT_ENCRYPTION} + export CSFLE_KMS_PROVIDERS='${CSFLE_KMS_PROVIDERS}' + export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}" + export AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}" + export CSFLE_GIT_REF="${CSFLE_GIT_REF}" + export CDRIVER_GIT_REF="${CDRIVER_GIT_REF}" + EOT + - command: shell.exec + type: test + params: + working_dir: "src" + timeout_secs: 60 + script: | + ${PREPARE_SHELL} + + # Disable xtrace (just in case it was accidentally set). + set +x + . ./prepare_client_encryption.sh + rm -f ./prepare_client_encryption.sh + + . $DRIVERS_TOOLS/.evergreen/download-mongodb.sh + get_distro + # get_distro defines $DISTRO. + get_mongodb_download_url_for "$DISTRO" "$MONGODB_VERSION" + # get_mongodb_download_url_for defines $MONGO_CRYPT_SHARED_DOWNLOAD_URL and $EXTRACT. + if [ -z "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" ]; then + echo "There is no crypt_shared library for distro='$DISTRO' and version='$MONGODB_VERSION'". + exit 1 + else + echo "Downloading crypt_shared package from $MONGO_CRYPT_SHARED_DOWNLOAD_URL" + download_and_extract_crypt_shared "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" "$EXTRACT" + CRYPT_SHARED_LIB_PATH="$(find $(pwd) -maxdepth 1 -type f \ + -name 'mongo_crypt_v1.so' -o \ + -name 'mongo_crypt_v1.dll' -o \ + -name 'mongo_crypt_v1.dylib')" + # Expect that we always find a crypt_shared library file and set the CRYPT_SHARED_LIB_PATH + # environment variable. If we didn't, print an error message and exit. + if [ -z "$CRYPT_SHARED_LIB_PATH" ]; then + echo 'CRYPT_SHARED_LIB_PATH is empty. Exiting.' + exit 1 + fi + # If we're on Windows, convert the "cygdrive" path to Windows-style paths. + if [ "Windows_NT" = "$OS" ]; then + CRYPT_SHARED_LIB_PATH=$(cygpath -m $CRYPT_SHARED_LIB_PATH) + fi + echo "CRYPT_SHARED_LIB_PATH: $CRYPT_SHARED_LIB_PATH" > expansion.yml + fi + + MONGODB_URI="${MONGODB_URI}" CRYPT_SHARED_LIB_PATH="${CRYPT_SHARED_LIB_PATH}" \ + bash ${PROJECT_DIRECTORY}/.evergreen/run-custom-csfle-tests.sh + "run custom snappy tests": - command: subprocess.exec params: diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 8e5428d3cde..ee1701c5f3c 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -754,6 +754,65 @@ functions: rm -f ./prepare_client_encryption.sh MONGODB_URI="${MONGODB_URI}" bash ${PROJECT_DIRECTORY}/.evergreen/run-custom-csfle-tests.sh + run custom csfle shared lib tests: + - command: shell.exec + type: test + params: + silent: true + working_dir: src + script: | + ${PREPARE_SHELL} + cat < prepare_client_encryption.sh + export CLIENT_ENCRYPTION=${CLIENT_ENCRYPTION} + export CSFLE_KMS_PROVIDERS='${CSFLE_KMS_PROVIDERS}' + export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}" + export AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}" + export CSFLE_GIT_REF="${CSFLE_GIT_REF}" + export CDRIVER_GIT_REF="${CDRIVER_GIT_REF}" + EOT + - command: shell.exec + type: test + params: + working_dir: src + timeout_secs: 60 + script: | + ${PREPARE_SHELL} + + # Disable xtrace (just in case it was accidentally set). + set +x + . ./prepare_client_encryption.sh + rm -f ./prepare_client_encryption.sh + + . $DRIVERS_TOOLS/.evergreen/download-mongodb.sh + get_distro + # get_distro defines $DISTRO. + get_mongodb_download_url_for "$DISTRO" "$MONGODB_VERSION" + # get_mongodb_download_url_for defines $MONGO_CRYPT_SHARED_DOWNLOAD_URL and $EXTRACT. + if [ -z "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" ]; then + echo "There is no crypt_shared library for distro='$DISTRO' and version='$MONGODB_VERSION'". + exit 1 + else + echo "Downloading crypt_shared package from $MONGO_CRYPT_SHARED_DOWNLOAD_URL" + download_and_extract_crypt_shared "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" "$EXTRACT" + CRYPT_SHARED_LIB_PATH="$(find $(pwd) -maxdepth 1 -type f \ + -name 'mongo_crypt_v1.so' -o \ + -name 'mongo_crypt_v1.dll' -o \ + -name 'mongo_crypt_v1.dylib')" + # Expect that we always find a crypt_shared library file and set the CRYPT_SHARED_LIB_PATH + # environment variable. If we didn't, print an error message and exit. + if [ -z "$CRYPT_SHARED_LIB_PATH" ]; then + echo 'CRYPT_SHARED_LIB_PATH is empty. Exiting.' + exit 1 + fi + # If we're on Windows, convert the "cygdrive" path to Windows-style paths. + if [ "Windows_NT" = "$OS" ]; then + CRYPT_SHARED_LIB_PATH=$(cygpath -m $CRYPT_SHARED_LIB_PATH) + fi + echo "CRYPT_SHARED_LIB_PATH: $CRYPT_SHARED_LIB_PATH" > expansion.yml + fi + + MONGODB_URI="${MONGODB_URI}" CRYPT_SHARED_LIB_PATH="${CRYPT_SHARED_LIB_PATH}" \ + bash ${PROJECT_DIRECTORY}/.evergreen/run-custom-csfle-tests.sh run custom snappy tests: - command: subprocess.exec params: diff --git a/.evergreen/run-custom-csfle-tests.sh b/.evergreen/run-custom-csfle-tests.sh index 59bed7e6ff8..e4130bf742e 100644 --- a/.evergreen/run-custom-csfle-tests.sh +++ b/.evergreen/run-custom-csfle-tests.sh @@ -65,6 +65,11 @@ export MONGODB_URI=${MONGODB_URI} export KMIP_TLS_CA_FILE="${DRIVERS_TOOLS}/.evergreen/x509gen/ca.pem" export KMIP_TLS_CERT_FILE="${DRIVERS_TOOLS}/.evergreen/x509gen/client.pem" export TEST_CSFLE=true + +if [ -n "$CRYPT_SHARED_LIB_PATH" ]; then + export CRYPT_SHARED_LIB_PATH=${CRYPT_SHARED_LIB_PATH} +fi + set +o errexit # We want to run both test suites even if the first fails npm run check:csfle DRIVER_CSFLE_TEST_RESULT=$? From bc5fd2da3791ca8a7e08f36f6cee121409e4847b Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Tue, 26 Jul 2022 15:31:42 +0200 Subject: [PATCH 02/10] test(NODE-4463): set version properly --- .evergreen/config.in.yml | 7 +++++++ .evergreen/config.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 9557f04e8d7..71cb1369ab7 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -818,9 +818,16 @@ functions: . ./prepare_client_encryption.sh rm -f ./prepare_client_encryption.sh + MONGODB_VERSION=${VERSION} + if [ -z "$MONGODB_VERSION" ]; then + # default to latest to match behavior of run-orchestration.sh. + MONGODB_VERSION=latest + fi + . $DRIVERS_TOOLS/.evergreen/download-mongodb.sh get_distro # get_distro defines $DISTRO. + echo "distro='$DISTRO' version='$MONGODB_VERSION'". get_mongodb_download_url_for "$DISTRO" "$MONGODB_VERSION" # get_mongodb_download_url_for defines $MONGO_CRYPT_SHARED_DOWNLOAD_URL and $EXTRACT. if [ -z "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" ]; then diff --git a/.evergreen/config.yml b/.evergreen/config.yml index ee1701c5f3c..4d0478d9373 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -783,9 +783,16 @@ functions: . ./prepare_client_encryption.sh rm -f ./prepare_client_encryption.sh + MONGODB_VERSION=${VERSION} + if [ -z "$MONGODB_VERSION" ]; then + # default to latest to match behavior of run-orchestration.sh. + MONGODB_VERSION=latest + fi + . $DRIVERS_TOOLS/.evergreen/download-mongodb.sh get_distro # get_distro defines $DISTRO. + echo "distro='$DISTRO' version='$MONGODB_VERSION'". get_mongodb_download_url_for "$DISTRO" "$MONGODB_VERSION" # get_mongodb_download_url_for defines $MONGO_CRYPT_SHARED_DOWNLOAD_URL and $EXTRACT. if [ -z "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" ]; then From 5e47abd6c9743f1177f9c1f7ab2ffbc0ae84b40a Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Thu, 28 Jul 2022 14:07:12 +0200 Subject: [PATCH 03/10] test(NODE-4463): split out csfle tasks --- .evergreen/config.yml | 42 ++++++++++++++++-- .evergreen/generate_evergreen_tasks.js | 60 +++++++++++++++++++++++++- 2 files changed, 96 insertions(+), 6 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 4d0478d9373..f20ee1634aa 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1719,7 +1719,7 @@ tasks: - func: run bson-ext test vars: NODE_LTS_NAME: erbium - - name: run-custom-csfle-tests-pinned-commit + - name: run-custom-csfle-tests-pinned-commit-mongocryptd tags: - run-custom-dependency-tests commands: @@ -1734,7 +1734,7 @@ tasks: - func: run custom csfle tests vars: CSFLE_GIT_REF: c2712248e9f4909cdad723607ea5291d2eb48b91 - - name: run-custom-csfle-tests-master + - name: run-custom-csfle-tests-master-mongocryptd tags: - run-custom-dependency-tests commands: @@ -1749,6 +1749,38 @@ tasks: - func: run custom csfle tests vars: CSFLE_GIT_REF: master + - name: run-custom-csfle-shared-lib-tests-pinned-commit + tags: + - run-custom-dependency-tests + commands: + - func: install dependencies + vars: + NODE_LTS_NAME: erbium + - func: bootstrap mongo-orchestration + vars: + VERSION: latest + TOPOLOGY: replica_set + - func: bootstrap kms servers + - func: run custom csfle shared lib tests + vars: + VERSION: latest + CSFLE_GIT_REF: c2712248e9f4909cdad723607ea5291d2eb48b91 + - name: run-custom-csfle-shared-lib-tests-master + tags: + - run-custom-dependency-tests + commands: + - func: install dependencies + vars: + NODE_LTS_NAME: erbium + - func: bootstrap mongo-orchestration + vars: + VERSION: latest + TOPOLOGY: replica_set + - func: bootstrap kms servers + - func: run custom csfle shared lib tests + vars: + VERSION: latest + CSFLE_GIT_REF: master - name: test-latest-server-noauth tags: - latest @@ -2309,8 +2341,10 @@ buildvariants: tasks: - run-custom-snappy-tests - run-bson-ext-test - - run-custom-csfle-tests-pinned-commit - - run-custom-csfle-tests-master + - run-custom-csfle-tests-pinned-commit-mongocryptd + - run-custom-csfle-tests-master-mongocryptd + - run-custom-csfle-shared-lib-tests-pinned-commit + - run-custom-csfle-shared-lib-tests-master - name: ubuntu1804-test-serverless display_name: Serverless Test run_on: ubuntu1804-test diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index 2a88dd605dd..48d14a4c026 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -537,7 +537,7 @@ const oneOffFuncAsTasks = oneOffFuncs.map(oneOffFunc => ({ })); oneOffFuncAsTasks.push({ - name: 'run-custom-csfle-tests-pinned-commit', + name: 'run-custom-csfle-tests-pinned-commit-mongocryptd', tags: ['run-custom-dependency-tests'], commands: [ { @@ -564,7 +564,7 @@ oneOffFuncAsTasks.push({ }); oneOffFuncAsTasks.push({ - name: 'run-custom-csfle-tests-master', + name: 'run-custom-csfle-tests-master-mongocryptd', tags: ['run-custom-dependency-tests'], commands: [ { @@ -590,6 +590,62 @@ oneOffFuncAsTasks.push({ ] }); +oneOffFuncAsTasks.push({ + name: 'run-custom-csfle-shared-lib-tests-pinned-commit', + tags: ['run-custom-dependency-tests'], + commands: [ + { + func: 'install dependencies', + vars: { + NODE_LTS_NAME: LOWEST_LTS + } + }, + { + func: 'bootstrap mongo-orchestration', + vars: { + VERSION: 'latest', + TOPOLOGY: 'replica_set' + } + }, + { func: 'bootstrap kms servers' }, + { + func: 'run custom csfle shared lib tests', + vars: { + VERSION: 'latest', + CSFLE_GIT_REF: 'c2712248e9f4909cdad723607ea5291d2eb48b91' + } + } + ] +}); + +oneOffFuncAsTasks.push({ + name: 'run-custom-csfle-shared-lib-tests-master', + tags: ['run-custom-dependency-tests'], + commands: [ + { + func: 'install dependencies', + vars: { + NODE_LTS_NAME: LOWEST_LTS + } + }, + { + func: 'bootstrap mongo-orchestration', + vars: { + VERSION: 'latest', + TOPOLOGY: 'replica_set' + } + }, + { func: 'bootstrap kms servers' }, + { + func: 'run custom csfle shared lib tests', + vars: { + VERSION: 'latest', + CSFLE_GIT_REF: 'master' + } + } + ] +}); + // TODO NODE-3897 - generate combined coverage report const coverageTask = { name: 'download and merge coverage'.split(' ').join('-'), From 322097a9ea2029e9ce9fea35a61eeabb91efefc6 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Thu, 28 Jul 2022 14:15:11 +0200 Subject: [PATCH 04/10] test(NODE-4463): move download script --- .evergreen/config.in.yml | 36 ++------------------------ .evergreen/config.yml | 36 ++------------------------ .evergreen/prepare-crypt-shared-lib.sh | 35 +++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 68 deletions(-) create mode 100755 .evergreen/prepare-crypt-shared-lib.sh diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 71cb1369ab7..2b5ee47f516 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -818,40 +818,8 @@ functions: . ./prepare_client_encryption.sh rm -f ./prepare_client_encryption.sh - MONGODB_VERSION=${VERSION} - if [ -z "$MONGODB_VERSION" ]; then - # default to latest to match behavior of run-orchestration.sh. - MONGODB_VERSION=latest - fi - - . $DRIVERS_TOOLS/.evergreen/download-mongodb.sh - get_distro - # get_distro defines $DISTRO. - echo "distro='$DISTRO' version='$MONGODB_VERSION'". - get_mongodb_download_url_for "$DISTRO" "$MONGODB_VERSION" - # get_mongodb_download_url_for defines $MONGO_CRYPT_SHARED_DOWNLOAD_URL and $EXTRACT. - if [ -z "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" ]; then - echo "There is no crypt_shared library for distro='$DISTRO' and version='$MONGODB_VERSION'". - exit 1 - else - echo "Downloading crypt_shared package from $MONGO_CRYPT_SHARED_DOWNLOAD_URL" - download_and_extract_crypt_shared "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" "$EXTRACT" - CRYPT_SHARED_LIB_PATH="$(find $(pwd) -maxdepth 1 -type f \ - -name 'mongo_crypt_v1.so' -o \ - -name 'mongo_crypt_v1.dll' -o \ - -name 'mongo_crypt_v1.dylib')" - # Expect that we always find a crypt_shared library file and set the CRYPT_SHARED_LIB_PATH - # environment variable. If we didn't, print an error message and exit. - if [ -z "$CRYPT_SHARED_LIB_PATH" ]; then - echo 'CRYPT_SHARED_LIB_PATH is empty. Exiting.' - exit 1 - fi - # If we're on Windows, convert the "cygdrive" path to Windows-style paths. - if [ "Windows_NT" = "$OS" ]; then - CRYPT_SHARED_LIB_PATH=$(cygpath -m $CRYPT_SHARED_LIB_PATH) - fi - echo "CRYPT_SHARED_LIB_PATH: $CRYPT_SHARED_LIB_PATH" > expansion.yml - fi + VERSION=${VERSION} DRIVERS_TOOLS=${DRIVERS_TOOLS} \ + bash ${PROJECT_DIRECTORY}/.evergreen/prepare-crypt-shared-lib.sh MONGODB_URI="${MONGODB_URI}" CRYPT_SHARED_LIB_PATH="${CRYPT_SHARED_LIB_PATH}" \ bash ${PROJECT_DIRECTORY}/.evergreen/run-custom-csfle-tests.sh diff --git a/.evergreen/config.yml b/.evergreen/config.yml index f20ee1634aa..bfdb5d4d36b 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -783,40 +783,8 @@ functions: . ./prepare_client_encryption.sh rm -f ./prepare_client_encryption.sh - MONGODB_VERSION=${VERSION} - if [ -z "$MONGODB_VERSION" ]; then - # default to latest to match behavior of run-orchestration.sh. - MONGODB_VERSION=latest - fi - - . $DRIVERS_TOOLS/.evergreen/download-mongodb.sh - get_distro - # get_distro defines $DISTRO. - echo "distro='$DISTRO' version='$MONGODB_VERSION'". - get_mongodb_download_url_for "$DISTRO" "$MONGODB_VERSION" - # get_mongodb_download_url_for defines $MONGO_CRYPT_SHARED_DOWNLOAD_URL and $EXTRACT. - if [ -z "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" ]; then - echo "There is no crypt_shared library for distro='$DISTRO' and version='$MONGODB_VERSION'". - exit 1 - else - echo "Downloading crypt_shared package from $MONGO_CRYPT_SHARED_DOWNLOAD_URL" - download_and_extract_crypt_shared "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" "$EXTRACT" - CRYPT_SHARED_LIB_PATH="$(find $(pwd) -maxdepth 1 -type f \ - -name 'mongo_crypt_v1.so' -o \ - -name 'mongo_crypt_v1.dll' -o \ - -name 'mongo_crypt_v1.dylib')" - # Expect that we always find a crypt_shared library file and set the CRYPT_SHARED_LIB_PATH - # environment variable. If we didn't, print an error message and exit. - if [ -z "$CRYPT_SHARED_LIB_PATH" ]; then - echo 'CRYPT_SHARED_LIB_PATH is empty. Exiting.' - exit 1 - fi - # If we're on Windows, convert the "cygdrive" path to Windows-style paths. - if [ "Windows_NT" = "$OS" ]; then - CRYPT_SHARED_LIB_PATH=$(cygpath -m $CRYPT_SHARED_LIB_PATH) - fi - echo "CRYPT_SHARED_LIB_PATH: $CRYPT_SHARED_LIB_PATH" > expansion.yml - fi + VERSION=${VERSION} DRIVERS_TOOLS=${DRIVERS_TOOLS} \ + bash ${PROJECT_DIRECTORY}/.evergreen/prepare-crypt-shared-lib.sh MONGODB_URI="${MONGODB_URI}" CRYPT_SHARED_LIB_PATH="${CRYPT_SHARED_LIB_PATH}" \ bash ${PROJECT_DIRECTORY}/.evergreen/run-custom-csfle-tests.sh diff --git a/.evergreen/prepare-crypt-shared-lib.sh b/.evergreen/prepare-crypt-shared-lib.sh new file mode 100755 index 00000000000..3c07de9f33c --- /dev/null +++ b/.evergreen/prepare-crypt-shared-lib.sh @@ -0,0 +1,35 @@ +MONGODB_VERSION=${VERSION} +if [ -z "$MONGODB_VERSION" ]; then + # default to latest to match behavior of run-orchestration.sh. + MONGODB_VERSION=latest +fi + +. $DRIVERS_TOOLS/.evergreen/download-mongodb.sh +get_distro +# get_distro defines $DISTRO. +echo "distro='$DISTRO' version='$MONGODB_VERSION'". +get_mongodb_download_url_for "$DISTRO" "$MONGODB_VERSION" +# get_mongodb_download_url_for defines $MONGO_CRYPT_SHARED_DOWNLOAD_URL and $EXTRACT. +if [ -z "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" ]; then + echo "There is no crypt_shared library for distro='$DISTRO' and version='$MONGODB_VERSION'". + exit 1 +else + echo "Downloading crypt_shared package from $MONGO_CRYPT_SHARED_DOWNLOAD_URL" + download_and_extract_crypt_shared "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" "$EXTRACT" + CRYPT_SHARED_LIB_PATH="$(find $(pwd) -maxdepth 1 -type f \ + -name 'mongo_crypt_v1.so' -o \ + -name 'mongo_crypt_v1.dll' -o \ + -name 'mongo_crypt_v1.dylib')" + # Expect that we always find a crypt_shared library file and set the CRYPT_SHARED_LIB_PATH + # environment variable. If we didn't, print an error message and exit. + if [ -z "$CRYPT_SHARED_LIB_PATH" ]; then + echo 'CRYPT_SHARED_LIB_PATH is empty. Exiting.' + exit 1 + fi + # If we're on Windows, convert the "cygdrive" path to Windows-style paths. + if [ "Windows_NT" = "$OS" ]; then + CRYPT_SHARED_LIB_PATH=$(cygpath -m $CRYPT_SHARED_LIB_PATH) + fi + echo "CRYPT_SHARED_LIB_PATH: $CRYPT_SHARED_LIB_PATH" + export CRYPT_SHARED_LIB_PATH=${CRYPT_SHARED_LIB_PATH} +fi From 46fb0873c51e64de5d9f981742571c0ecb89d2d3 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Thu, 28 Jul 2022 15:33:30 +0200 Subject: [PATCH 05/10] test(NODE-4463): update test readme --- test/readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/readme.md b/test/readme.md index 8a2df49fea6..c764b87dfcd 100644 --- a/test/readme.md +++ b/test/readme.md @@ -416,6 +416,8 @@ The following steps will walk you through how to run the tests for CSFLE. The output of the tests will include sections like "Client Side Encryption Corpus," "Client Side Encryption Functional," "Client Side Encryption Prose Tests," and "Client Side Encryption." + To run the functional tests using the crypt shared lirary instead of mongocryptd, download the appropriate version of the crypt shared library for the enterprise server version [here](https://www.mongodb.com/download-center/enterprise/releases) and then set the location of it in the environment variable `CRYPT_SHARED_LIB_PATH`. + #### KMIP FLE support tests 1. Install virtualenv: `pip install virtualenv` From 9568651a7bbdad9cd10823684172218d9b88f285 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Thu, 28 Jul 2022 19:25:49 +0200 Subject: [PATCH 06/10] Update test/readme.md Co-authored-by: Anna Henningsen --- test/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/readme.md b/test/readme.md index c764b87dfcd..11b69fbb258 100644 --- a/test/readme.md +++ b/test/readme.md @@ -416,7 +416,7 @@ The following steps will walk you through how to run the tests for CSFLE. The output of the tests will include sections like "Client Side Encryption Corpus," "Client Side Encryption Functional," "Client Side Encryption Prose Tests," and "Client Side Encryption." - To run the functional tests using the crypt shared lirary instead of mongocryptd, download the appropriate version of the crypt shared library for the enterprise server version [here](https://www.mongodb.com/download-center/enterprise/releases) and then set the location of it in the environment variable `CRYPT_SHARED_LIB_PATH`. + To run the functional tests using the crypt shared library instead of mongocryptd, download the appropriate version of the crypt shared library for the enterprise server version [here](https://www.mongodb.com/download-center/enterprise/releases) and then set the location of it in the environment variable `CRYPT_SHARED_LIB_PATH`. #### KMIP FLE support tests From 842e80c92b9bf4fcda66aed5d23c16cb35e264ff Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Fri, 29 Jul 2022 14:00:21 +0200 Subject: [PATCH 07/10] chore(NODE-4463): use only single quotes --- .evergreen/config.in.yml | 10 +++++----- .evergreen/config.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index 2b5ee47f516..b6b42f84102 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -798,12 +798,12 @@ functions: script: | ${PREPARE_SHELL} cat < prepare_client_encryption.sh - export CLIENT_ENCRYPTION=${CLIENT_ENCRYPTION} + export CLIENT_ENCRYPTION='${CLIENT_ENCRYPTION}' export CSFLE_KMS_PROVIDERS='${CSFLE_KMS_PROVIDERS}' - export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}" - export AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}" - export CSFLE_GIT_REF="${CSFLE_GIT_REF}" - export CDRIVER_GIT_REF="${CDRIVER_GIT_REF}" + export AWS_ACCESS_KEY_ID='${AWS_ACCESS_KEY_ID}' + export AWS_SECRET_ACCESS_KEY='${AWS_SECRET_ACCESS_KEY}' + export CSFLE_GIT_REF='${CSFLE_GIT_REF}' + export CDRIVER_GIT_REF='${CDRIVER_GIT_REF}' EOT - command: shell.exec type: test diff --git a/.evergreen/config.yml b/.evergreen/config.yml index bfdb5d4d36b..e1b04e49cd6 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -763,12 +763,12 @@ functions: script: | ${PREPARE_SHELL} cat < prepare_client_encryption.sh - export CLIENT_ENCRYPTION=${CLIENT_ENCRYPTION} + export CLIENT_ENCRYPTION='${CLIENT_ENCRYPTION}' export CSFLE_KMS_PROVIDERS='${CSFLE_KMS_PROVIDERS}' - export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}" - export AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}" - export CSFLE_GIT_REF="${CSFLE_GIT_REF}" - export CDRIVER_GIT_REF="${CDRIVER_GIT_REF}" + export AWS_ACCESS_KEY_ID='${AWS_ACCESS_KEY_ID}' + export AWS_SECRET_ACCESS_KEY='${AWS_SECRET_ACCESS_KEY}' + export CSFLE_GIT_REF='${CSFLE_GIT_REF}' + export CDRIVER_GIT_REF='${CDRIVER_GIT_REF}' EOT - command: shell.exec type: test From 4edc9d92df14e60e8cf8f15f79f77563601fa483 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Fri, 29 Jul 2022 17:06:30 +0200 Subject: [PATCH 08/10] Update .evergreen/generate_evergreen_tasks.js Co-authored-by: Bailey Pearson --- .evergreen/generate_evergreen_tasks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index 48d14a4c026..96b5b4b7d91 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -537,7 +537,7 @@ const oneOffFuncAsTasks = oneOffFuncs.map(oneOffFunc => ({ })); oneOffFuncAsTasks.push({ - name: 'run-custom-csfle-tests-pinned-commit-mongocryptd', + name: 'run-custom-csfle-tests-mongocryptd-pinned-commit', tags: ['run-custom-dependency-tests'], commands: [ { From 1df10e9819752b4aeef017963bec3cd85389713b Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Fri, 29 Jul 2022 17:06:37 +0200 Subject: [PATCH 09/10] Update .evergreen/generate_evergreen_tasks.js Co-authored-by: Bailey Pearson --- .evergreen/generate_evergreen_tasks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index 96b5b4b7d91..f1c14a2cffd 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -564,7 +564,7 @@ oneOffFuncAsTasks.push({ }); oneOffFuncAsTasks.push({ - name: 'run-custom-csfle-tests-master-mongocryptd', + name: 'run-custom-csfle-tests-mongocryptd-master', tags: ['run-custom-dependency-tests'], commands: [ { From f5126b1719365af20b07ff4c826bb311799d8ef0 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Fri, 29 Jul 2022 17:20:34 +0200 Subject: [PATCH 10/10] test(NODE-4463): sync evg configs --- .evergreen/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index e1b04e49cd6..ac7b1b4b8d6 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1687,7 +1687,7 @@ tasks: - func: run bson-ext test vars: NODE_LTS_NAME: erbium - - name: run-custom-csfle-tests-pinned-commit-mongocryptd + - name: run-custom-csfle-tests-mongocryptd-pinned-commit tags: - run-custom-dependency-tests commands: @@ -1702,7 +1702,7 @@ tasks: - func: run custom csfle tests vars: CSFLE_GIT_REF: c2712248e9f4909cdad723607ea5291d2eb48b91 - - name: run-custom-csfle-tests-master-mongocryptd + - name: run-custom-csfle-tests-mongocryptd-master tags: - run-custom-dependency-tests commands: @@ -2309,8 +2309,8 @@ buildvariants: tasks: - run-custom-snappy-tests - run-bson-ext-test - - run-custom-csfle-tests-pinned-commit-mongocryptd - - run-custom-csfle-tests-master-mongocryptd + - run-custom-csfle-tests-mongocryptd-pinned-commit + - run-custom-csfle-tests-mongocryptd-master - run-custom-csfle-shared-lib-tests-pinned-commit - run-custom-csfle-shared-lib-tests-master - name: ubuntu1804-test-serverless