Skip to content

Commit

Permalink
test(NODE-6343): unskip Case 4: KMIP should fail with no TLS (#4203)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken authored Aug 29, 2024
1 parent 6d65ae7 commit 1f10bdf
Showing 1 changed file with 3 additions and 12 deletions.
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

0 comments on commit 1f10bdf

Please sign in to comment.