Skip to content

Commit c9083db

Browse files
chore(NODE-4358): move legacy tests to legacy folder (#3307)
1 parent 761f853 commit c9083db

File tree

192 files changed

+8925
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+8925
-20
lines changed

test/integration/client-side-encryption/client_side_encryption.spec.test.js renamed to test/integration/client-side-encryption/client_side_encryption.spec.test.ts

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
'use strict';
1+
import * as path from 'path';
22

3-
const path = require('path');
4-
const {
5-
TestRunnerContext,
3+
import { loadSpecTests } from '../../spec';
4+
import {
65
gatherTestSuites,
7-
generateTopologyTests
8-
} = require('../../tools/spec-runner');
6+
generateTopologyTests,
7+
TestRunnerContext
8+
} from '../../tools/spec-runner';
9+
import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner';
910

1011
const isAuthEnabled = process.env.AUTH === 'auth';
1112

@@ -62,11 +63,10 @@ const SKIPPED_TESTS = new Set([
6263
...(isAuthEnabled ? skippedAuthTests.concat(skippedNoAuthTests) : skippedNoAuthTests)
6364
]);
6465

65-
describe('Client Side Encryption', function () {
66-
const testContext = new TestRunnerContext();
67-
testContext.requiresCSFLE = true;
66+
describe('Client Side Encryption (Legacy)', function () {
67+
const testContext = new TestRunnerContext({ requiresCSFLE: true });
6868
const testSuites = gatherTestSuites(
69-
path.join(__dirname, '../../spec/client-side-encryption/tests'),
69+
path.join(__dirname, '../../spec/client-side-encryption/tests/legacy'),
7070
testContext
7171
);
7272
after(() => testContext.teardown());
@@ -78,3 +78,10 @@ describe('Client Side Encryption', function () {
7878
return !SKIPPED_TESTS.has(spec.description);
7979
});
8080
});
81+
82+
describe('Client Side Encryption (Unified)', function () {
83+
runUnifiedSuite(
84+
loadSpecTests(path.join('client-side-encryption', 'tests', 'unified')),
85+
() => 'NODE-4330 - implement the key management API'
86+
);
87+
});

test/integration/unified-test-format/unified_test_format.spec.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ const filter: TestFilter = ({ description }) => {
3737
return 'TODO(NODE-3891): fix tests broken when AUTH enabled';
3838
}
3939

40+
if (description.length === 0) {
41+
// This may seem weird, but the kmsProvider valid pass tests really test that the new
42+
// client encryption entity is constructed correctly so the "test" section of each
43+
// unified test is empty (save the required properties) and the test description
44+
// is just the empty string
45+
return 'TODO(NODE-4363): add support for client encryption entity to unified runner';
46+
}
47+
4048
return false;
4149
};
4250

0 commit comments

Comments
 (0)