Skip to content

Commit 1f10bdf

Browse files
authored
test(NODE-6343): unskip Case 4: KMIP should fail with no TLS (#4203)
1 parent 6d65ae7 commit 1f10bdf

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

test/integration/client-side-encryption/client_side_encryption.prose.test.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const { EJSON } = BSON;
1010
const { LEGACY_HELLO_COMMAND, MongoCryptError } = require('../../mongodb');
1111
const { MongoServerError, MongoServerSelectionError, MongoClient } = require('../../mongodb');
1212
const { getEncryptExtraOptions } = require('../../tools/utils');
13-
const { coerce, gte } = require('semver');
1413

1514
const {
1615
externalSchema
@@ -1654,17 +1653,9 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
16541653
const masterKey = {};
16551654

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

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

0 commit comments

Comments
 (0)