Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"recursive": true,
"timeout": 60000,
"reporter": "test/tools/reporter/mongodb_reporter.js",
"sort": true,
"color": true
}
8 changes: 4 additions & 4 deletions test/tools/sdam_viz → etc/sdam_viz.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env node
'use strict';
/* eslint-disable no-console */
/* eslint-disable @typescript-eslint/no-var-requires */

const { MongoClient } = require('../../src');
const visualizeMonitoringEvents = require('./utils').visualizeMonitoringEvents;
const { now, calculateDurationInMs } = require('../../lib/utils');
const { now, calculateDurationInMs } = require('../../src/utils');
const chalk = require('chalk');
const argv = require('yargs')
.usage('Usage: $0 [options] <connection string>')
Expand Down Expand Up @@ -84,7 +84,7 @@ async function scheduleWriteWorkload(client) {

try {
const start = now();
const result = await client.db('test').collection('test').insertOne({ a: 42 });
await client.db('test').collection('test').insertOne({ a: 42 });
averageWriteMS = 0.2 * calculateDurationInMs(start) + 0.8 * averageWriteMS;

completedWriteWorkloads++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,14 +552,16 @@ describe('Client Side Encryption Prose Tests', function () {
const limitsKey = loadLimits('limits-key.json');
const limitsDoc = loadLimits('limits-doc.json');

before(function () {
// First, perform the setup.
let firstTimeSetup = true;
beforeEach(async function () {
if (firstTimeSetup) {
firstTimeSetup = false;
// First, perform the setup.

// #. Create a MongoClient without encryption enabled (referred to as ``client``).
this.client = this.configuration.newClient();
// #. Create a MongoClient without encryption enabled (referred to as ``client``).
this.client = this.configuration.newClient();

return (
this.client
await this.client
.connect()
// #. Using ``client``, drop and create the collection ``db.coll`` configured with the included JSON schema `limits/limits-schema.json <../limits/limits-schema.json>`_.
.then(() => dropCollection(this.client.db(dataDbName), dataCollName))
Expand All @@ -575,11 +577,9 @@ describe('Client Side Encryption Prose Tests', function () {
.db(keyVaultDbName)
.collection(keyVaultCollName)
.insertOne(limitsKey, { writeConcern: { w: 'majority' } });
})
);
});
});
}

beforeEach(function () {
// #. Create a MongoClient configured with auto encryption (referred to as ``client_encrypted``)
// Configure with the ``local`` KMS provider as follows:
// .. code:: javascript
Expand Down
28 changes: 0 additions & 28 deletions test/tools/deprecate_warning_test_program.js

This file was deleted.

78 changes: 0 additions & 78 deletions test/tools/docker-mongodb/Dockerfile

This file was deleted.

37 changes: 0 additions & 37 deletions test/tools/docker-mongodb/docker-entrypoint.sh

This file was deleted.

59 changes: 0 additions & 59 deletions test/tools/docker_cluster.sh

This file was deleted.

9 changes: 0 additions & 9 deletions test/tools/run_each_test.sh

This file was deleted.

7 changes: 1 addition & 6 deletions test/tools/runner/filters/client_encryption_filter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const mongodb = require('../../../../src');
const semver = require('semver');

/**
* Filter for whether or not a test needs / doesn't need Client Side Encryption
Expand Down Expand Up @@ -40,11 +39,7 @@ class ClientSideEncryptionFilter {
const clientSideEncryption =
test.metadata && test.metadata.requires && test.metadata.requires.clientSideEncryption;

// CSFLE is only supported on LTS versions of node
const nodeSupportsCSFLE = semver.satisfies(process.version, '>4');

const ret = typeof clientSideEncryption !== 'boolean' || clientSideEncryption === this.enabled;
return ret && nodeSupportsCSFLE;
return typeof clientSideEncryption !== 'boolean' || clientSideEncryption === this.enabled;
}
}

Expand Down
Loading