Skip to content

test(NODE-6343): unskip Case 4: KMIP should fail with no TLS #4203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 29, 2024
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