Skip to content
Merged
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const { EJSON } = BSON;
const { LEGACY_HELLO_COMMAND, MongoCryptError } = require('../../mongodb');
const { MongoServerError, MongoServerSelectionError, MongoClient } = require('../../mongodb');
const { getEncryptExtraOptions } = require('../../tools/utils');
const { coerce, gte } = require('semver');

const {
externalSchema
Expand Down Expand Up @@ -1654,17 +1653,9 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
const masterKey = {};

it('should fail with no TLS', metadata, async function () {
if (gte(coerce(process.version), coerce('19'))) {
this.test.skipReason = 'TODO(NODE-4942): fix failing csfle kmip test on Node19+';
this.skip();
}
try {
await clientEncryptionNoTls.createDataKey('kmip', { masterKey });
expect.fail('it must fail with no tls');
} catch (e) {
//Expect an error indicating TLS handshake failed.
expect(e.cause.message).to.match(/before secure TLS connection|handshake/);
}
const e = await clientEncryptionNoTls.createDataKey('kmip', { masterKey }).catch(e => e);
//Expect an error indicating TLS handshake failed.
expect(e.cause.message).to.match(/before secure TLS connection|handshake/);
});

it('should succeed with valid TLS options', metadata, async function () {
Expand Down