diff --git a/.evergreen/config.yml b/.evergreen/config.yml index bbf80529f9..1d7e654edc 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1630,7 +1630,7 @@ tasks: - func: bootstrap mongo-orchestration vars: VERSION: latest - TOPOLOGY: server + TOPOLOGY: replica_set - func: bootstrap kms servers - func: run custom csfle tests - name: test-latest-server-noauth diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index 6d6a5e8daa..d7e4543fbf 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -512,7 +512,7 @@ oneOffFuncAsTasks.push({ func: 'bootstrap mongo-orchestration', vars: { VERSION: 'latest', - TOPOLOGY: 'server' + TOPOLOGY: 'replica_set' } }, { func: 'bootstrap kms servers' }, diff --git a/src/encrypter.ts b/src/encrypter.ts index a94153a93f..de654ef126 100644 --- a/src/encrypter.ts +++ b/src/encrypter.ts @@ -124,9 +124,15 @@ export class Encrypter { static checkForMongoCrypt(): void { let mongodbClientEncryption = undefined; + // Ensure you always wrap an optional require in the try block NODE-3199 try { - // Ensure you always wrap an optional require in the try block NODE-3199 - mongodbClientEncryption = require('mongodb-client-encryption'); + // Note (NODE-4254): This is to get around the circular dependency between + // mongodb-client-encryption and the driver in the test scenarios. + if (process.env.MONGODB_CLIENT_ENCRYPTION_OVERRIDE) { + mongodbClientEncryption = require(process.env.MONGODB_CLIENT_ENCRYPTION_OVERRIDE); + } else { + mongodbClientEncryption = require('mongodb-client-encryption'); + } } catch (err) { throw new MongoMissingDependencyError( 'Auto-encryption requested, but the module is not installed. ' +