Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2752,7 +2752,6 @@ tasks:
- {key: VERSION, value: latest}
- {key: TOPOLOGY, value: sharded_cluster}
- {key: AUTH, value: auth}
- {key: TEST_NPM_SCRIPT, value: check:csfle}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: run tests
Expand All @@ -2768,7 +2767,6 @@ tasks:
- {key: VERSION, value: rapid}
- {key: TOPOLOGY, value: sharded_cluster}
- {key: AUTH, value: auth}
- {key: TEST_NPM_SCRIPT, value: check:csfle}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: run tests
Expand All @@ -2784,7 +2782,6 @@ tasks:
- {key: VERSION, value: '8.0'}
- {key: TOPOLOGY, value: sharded_cluster}
- {key: AUTH, value: auth}
- {key: TEST_NPM_SCRIPT, value: check:csfle}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: run tests
Expand All @@ -2800,7 +2797,6 @@ tasks:
- {key: VERSION, value: '7.0'}
- {key: TOPOLOGY, value: sharded_cluster}
- {key: AUTH, value: auth}
- {key: TEST_NPM_SCRIPT, value: check:csfle}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: run tests
Expand All @@ -2816,7 +2812,6 @@ tasks:
- {key: VERSION, value: '6.0'}
- {key: TOPOLOGY, value: sharded_cluster}
- {key: AUTH, value: auth}
- {key: TEST_NPM_SCRIPT, value: check:csfle}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: run tests
Expand All @@ -2832,7 +2827,6 @@ tasks:
- {key: VERSION, value: '5.0'}
- {key: TOPOLOGY, value: sharded_cluster}
- {key: AUTH, value: auth}
- {key: TEST_NPM_SCRIPT, value: check:csfle}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: run tests
Expand All @@ -2848,7 +2842,6 @@ tasks:
- {key: VERSION, value: '4.4'}
- {key: TOPOLOGY, value: sharded_cluster}
- {key: AUTH, value: auth}
- {key: TEST_NPM_SCRIPT, value: check:csfle}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: run tests
Expand All @@ -2864,7 +2857,6 @@ tasks:
- {key: VERSION, value: '4.2'}
- {key: TOPOLOGY, value: sharded_cluster}
- {key: AUTH, value: auth}
- {key: TEST_NPM_SCRIPT, value: check:csfle}
- func: install dependencies
- func: bootstrap mongo-orchestration
- func: run tests
Expand Down
3 changes: 1 addition & 2 deletions .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,7 @@ const MONGOCRYPTD_CSFLE_TASKS = MONGODB_VERSIONS.filter(
updateExpansions({
VERSION: mongoVersion,
TOPOLOGY: 'sharded_cluster',
AUTH: 'auth',
TEST_NPM_SCRIPT: 'check:csfle'
AUTH: 'auth'
}),
{ func: 'install dependencies' },
{ func: 'bootstrap mongo-orchestration' },
Expand Down
10 changes: 4 additions & 6 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
#!/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
set -o errexit # Exit the script with error if any of the commands fail

# Supported/used environment variables:
# AUTH Set to enable authentication. Defaults to "noauth"
# SSL Set to enable SSL. Defaults to "nossl"
# MONGODB_URI Set the suggested connection MONGODB_URI (including credentials and topology info)
# MARCH Machine Architecture. Defaults to lowercase uname -m
# TEST_NPM_SCRIPT Script to npm run. Defaults to "integration-coverage"
# SKIP_DEPS Skip installing dependencies
# TEST_CSFLE Set to enforce running csfle tests

AUTH=${AUTH:-noauth}
MONGODB_URI=${MONGODB_URI:-}
TEST_NPM_SCRIPT=${TEST_NPM_SCRIPT:-check:integration-coverage}
COMPRESSOR=${COMPRESSOR:-}
SKIP_DEPS=${SKIP_DEPS:-true}

Expand All @@ -28,8 +26,8 @@ fi
# ssl setup
SSL=${SSL:-nossl}
if [ "$SSL" != "nossl" ]; then
export SSL_KEY_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/client.pem"
export SSL_CA_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/ca.pem"
export SSL_KEY_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/client.pem"
export SSL_CA_FILE="$DRIVERS_TOOLS/.evergreen/x509gen/ca.pem"
fi

# run tests
Expand Down Expand Up @@ -60,4 +58,4 @@ export MONGODB_URI=${MONGODB_URI}
export LOAD_BALANCER=${LOAD_BALANCER}
export TEST_CSFLE=${TEST_CSFLE}
export COMPRESSOR=${COMPRESSOR}
npm run "${TEST_NPM_SCRIPT}"
npm run check:integration-coverage
7 changes: 6 additions & 1 deletion src/client-side-encryption/auto_encrypter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,12 @@ export class AutoEncrypter {
return client;
} catch (error) {
const { message } = error;
if (message && (message.match(/timed out after/) || message.match(/ENOTFOUND/))) {
if (
message &&
(message.match(/timed out after/) ||
message.match(/ENOTFOUND/) ||
message.match(/ECONNREFUSED/))
) {
throw new MongoRuntimeError(
'Unable to connect to `mongocryptd`, please make sure it is running or in your PATH for auto-spawn',
{ cause: error }
Expand Down
Loading