diff --git a/.evergreen/config.yml b/.evergreen/config.yml index b42c08070c0..5613675c5b5 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1994,24 +1994,6 @@ tasks: - func: install mongodb-client-encryption from source - func: assume secrets manager role - func: run custom csfle tests - - name: test-latest-driver-mongodb-client-encryption-6.0.0 - tags: - - run-custom-dependency-tests - commands: - - command: expansions.update - type: setup - params: - updates: - - {key: NODE_LTS_VERSION, value: 20.19.0} - - {key: VERSION, value: '7.0'} - - {key: TOPOLOGY, value: replica_set} - - {key: CLIENT_ENCRYPTION, value: 'true'} - - func: install dependencies - - func: bootstrap mongo-orchestration - - func: install package - vars: - PACKAGE: mongodb-client-encryption@6.0.0 - - func: run tests - name: test-alpine-fle tags: - alpine-fle @@ -3205,7 +3187,6 @@ buildvariants: - run-custom-csfle-tests-5.0 - run-custom-csfle-tests-rapid - run-custom-csfle-tests-latest - - test-latest-driver-mongodb-client-encryption-6.0.0 - name: rhel8-test-gcp-kms display_name: GCP KMS Test run_on: debian11-small diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index 82449fb623f..0f122af12f4 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -623,27 +623,28 @@ for (const serverVersion of ['5.0', 'rapid', 'latest']) { }); } -customDependencyTests.push({ - name: `test-latest-driver-mongodb-client-encryption-6.0.0`, - tags: ['run-custom-dependency-tests'], - commands: [ - updateExpansions({ - NODE_LTS_VERSION: LOWEST_LTS, - VERSION: '7.0', - TOPOLOGY: 'replica_set', - CLIENT_ENCRYPTION: true - }), - { func: 'install dependencies' }, - { func: 'bootstrap mongo-orchestration' }, - { - func: 'install package', - vars: { - PACKAGE: 'mongodb-client-encryption@6.0.0' - } - }, - { func: 'run tests' } - ] -}); +// TODO(NODE-7218): release after mongodb-client-encryption 7.0.0 beta is available +// customDependencyTests.push({ +// name: `test-latest-driver-mongodb-client-encryption-6.0.0`, +// tags: ['run-custom-dependency-tests'], +// commands: [ +// updateExpansions({ +// NODE_LTS_VERSION: LOWEST_LTS, +// VERSION: '7.0', +// TOPOLOGY: 'replica_set', +// CLIENT_ENCRYPTION: true +// }), +// { func: 'install dependencies' }, +// { func: 'bootstrap mongo-orchestration' }, +// { +// func: 'install package', +// vars: { +// PACKAGE: 'mongodb-client-encryption@6.0.0' +// } +// }, +// { func: 'run tests' } +// ] +// }); const coverageTask = { name: 'download and merge coverage'.split(' ').join('-'), diff --git a/.evergreen/install-mongodb-client-encryption.sh b/.evergreen/install-mongodb-client-encryption.sh index 1bea94950b8..45caf26cbac 100644 --- a/.evergreen/install-mongodb-client-encryption.sh +++ b/.evergreen/install-mongodb-client-encryption.sh @@ -9,19 +9,10 @@ if [ -z ${PROJECT_DIRECTORY+omitted} ]; then echo "PROJECT_DIRECTORY is unset" & source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh rm -rf mongodb-client-encryption -git clone https://github.com/mongodb-js/mongodb-client-encryption.git +git clone https://github.com/baileympearson/mongodb-client-encryption.git -b NODE-7216 pushd mongodb-client-encryption -node --version -npm --version - -if [ -n "${LIBMONGOCRYPT_VERSION}" ]; then - # nightly tests test with `latest` to test against the laster FLE build. - npm run install:libmongocrypt -- --build --libVersion $LIBMONGOCRYPT_VERSION -else - # otherwise use whatever is specified in the package.json. - npm run install:libmongocrypt -fi +npm run install:libmongocrypt echo "finished installing libmongocrypt" diff --git a/src/client-side-encryption/auto_encrypter.ts b/src/client-side-encryption/auto_encrypter.ts index da70bf5cba4..b0298398033 100644 --- a/src/client-side-encryption/auto_encrypter.ts +++ b/src/client-side-encryption/auto_encrypter.ts @@ -258,7 +258,6 @@ export class AutoEncrypter { } const mongoCryptOptions: MongoCryptOptions = { - enableMultipleCollinfo: true, cryptoCallbacks }; if (options.schemaMap) { diff --git a/test/integration/client-side-encryption/client_side_encryption.prose.25.lookup.test.ts b/test/integration/client-side-encryption/client_side_encryption.prose.25.lookup.test.ts index d4365ac6d6d..a0a9f9c6a2d 100644 --- a/test/integration/client-side-encryption/client_side_encryption.prose.25.lookup.test.ts +++ b/test/integration/client-side-encryption/client_side_encryption.prose.25.lookup.test.ts @@ -362,71 +362,4 @@ describe('$lookup support', defaultMetadata, function () { /Upgrade/i, { requires: { ...defaultMetadata.requires, mongodb: '>=7.0.0 <8.1.0' } } ); - - describe('Node.js custom test', function () { - describe('when enableMultipleCollinfo is off and a $lookup is run', function () { - let client: MongoClient; - - beforeEach(async function () { - const mochaTest = { metadata: defaultMetadata }; - - if (!this.configuration.filters.MongoDBVersionFilter.filter(mochaTest)) { - return; - } - - if (!this.configuration.filters.MongoDBTopologyFilter.filter(mochaTest)) { - return; - } - - if (!this.configuration.filters.ClientSideEncryptionFilter.filter(mochaTest)) { - return; - } - - const getMongoCrypt = sinon.stub(AutoEncrypter, 'getMongoCrypt').callsFake(function () { - const MongoCrypt = getMongoCrypt.wrappedMethod.call(this); - return class extends MongoCrypt { - constructor(options: MongoCryptOptions) { - expect(options).to.have.property('enableMultipleCollinfo', true); // assert invariant - options.enableMultipleCollinfo = false; - super(options); - } - }; - }); - - client = newEncryptedClient(this); - }); - - afterEach(async function () { - sinon.restore(); - await client?.close(); - }); - - it( - 'throws a TypeError about libmongocrypt not enabled to support multiple collections', - defaultMetadata, - async () => { - const collection = client.db('db').collection('csfle'); - const actual = await collection - .aggregate([ - { $match: { csfle: 'csfle' } }, - { - $lookup: { - from: 'csfle2', - as: 'matched', - pipeline: [{ $match: { csfle2: 'csfle2' } }, { $project: { _id: 0 } }] - } - }, - { $project: { _id: 0 } } - ]) - .toArray() - .catch(error => error); - - expect(actual).to.be.instanceOf(TypeError); - expect(actual.message).to.match( - /libmongocrypt is not configured to support encrypting a command with multiple collections/i - ); - } - ); - }); - }); });