From c469618e212025e8b8b2c5c851afb8485b098080 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Wed, 21 Aug 2024 11:28:02 -0400 Subject: [PATCH 1/2] test(NODE-6343): unskip Case 4: KMIP should fail with no TLS --- .../client_side_encryption.prose.test.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/test/integration/client-side-encryption/client_side_encryption.prose.test.js b/test/integration/client-side-encryption/client_side_encryption.prose.test.js index 17aa23be691..0c07a383b8d 100644 --- a/test/integration/client-side-encryption/client_side_encryption.prose.test.js +++ b/test/integration/client-side-encryption/client_side_encryption.prose.test.js @@ -1654,17 +1654,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 () { From 27a611f8f5e839e07e090c09e99ef378b0827942 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Thu, 29 Aug 2024 11:07:47 -0400 Subject: [PATCH 2/2] fix: lint --- .../client-side-encryption/client_side_encryption.prose.test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/integration/client-side-encryption/client_side_encryption.prose.test.js b/test/integration/client-side-encryption/client_side_encryption.prose.test.js index 0c07a383b8d..b9a707ef895 100644 --- a/test/integration/client-side-encryption/client_side_encryption.prose.test.js +++ b/test/integration/client-side-encryption/client_side_encryption.prose.test.js @@ -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