Skip to content

Commit 458cf6d

Browse files
test(NODE-5898): small fixes and unskips of test TODOs (#4055)
1 parent f842c20 commit 458cf6d

13 files changed

+99
-167
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,6 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
11741174

11751175
expect(insertError).to.be.instanceOf(MongoServerSelectionError);
11761176

1177-
// TODO(NODE-5296): check error.message once AggregateErrors are handled correctly
11781177
expect(insertError, 'Error must contain ECONNREFUSED').to.satisfy(
11791178
error =>
11801179
/ECONNREFUSED/.test(error.message) ||
@@ -1260,7 +1259,6 @@ describe('Client Side Encryption Prose Tests', metadata, function () {
12601259
client = new MongoClient('mongodb://localhost:27021/db?serverSelectionTimeoutMS=1000');
12611260
const error = await client.connect().catch(e => e);
12621261

1263-
// TODO(NODE-5296): check error.message once AggregateErrors are handled correctly
12641262
expect(error, 'Error MUST be a MongoServerSelectionError error').to.be.instanceOf(
12651263
MongoServerSelectionError
12661264
);

test/integration/client-side-encryption/client_side_encryption.spec.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ const skippedAuthTests = [
4747
'Insert a document with auto encryption using KMIP KMS provider'
4848
];
4949

50-
// TODO(NODE-4006): Investigate csfle test "operation fails with maxWireVersion < 8"
51-
// TODO(NODE-4324): Int32 and Long not allowed as batchSize option to cursor.
52-
const skippedNoAuthTests = ['getMore with encryption', 'operation fails with maxWireVersion < 8'];
50+
// TODO(NODE-6048): Int32 and Long not allowed as batchSize option to cursor.
51+
const skippedNoAuthTests = ['getMore with encryption'];
5352

5453
const SKIPPED_TESTS = new Set([
5554
...(isAuthEnabled ? skippedAuthTests.concat(skippedNoAuthTests) : skippedNoAuthTests),

test/integration/command-logging-and-monitoring/command_logging_and_monitoring.spec.test.ts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,23 @@ import * as path from 'path';
33
import { loadSpecTests } from '../../spec';
44
import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner';
55

6-
// This is skipped because our command monitoring happens at the connection
7-
// level and is using the server reply for the single insert that the bulk
8-
// performed since it was only one document in the test. The test expectation
9-
// is that we are using the bulk write result which was returned to the user
10-
// as the reply in the command succeeded event instead of our raw reply from
11-
// the server. There's nothing we can change here.
12-
const SKIP = ['A successful unordered bulk write with an unacknowledged write concern'];
13-
146
describe('Command Logging and Monitoring Spec', function () {
157
describe('Command Monitoring Spec (unified)', () => {
168
runUnifiedSuite(
179
loadSpecTests(path.join('command-logging-and-monitoring', 'monitoring')),
18-
({ description }) =>
19-
SKIP.includes(description)
20-
? `TODO(NODE-4261): support skip reasons in unified tests`
21-
: false
10+
({ description }) => {
11+
// This is skipped because our command monitoring happens at the connection
12+
// level and is using the server reply for the single insert that the bulk
13+
// performed since it was only one document in the test. The test expectation
14+
// is that we are using the bulk write result which was returned to the user
15+
// as the reply in the command succeeded event instead of our raw reply from
16+
// the server. There's nothing we can change here.
17+
return description.includes(
18+
'A successful unordered bulk write with an unacknowledged write concern'
19+
)
20+
? `Test not applicable to Node.`
21+
: false;
22+
}
2223
);
2324
});
2425

test/integration/command-logging-and-monitoring/command_monitoring.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ describe('Command Monitoring', function () {
9898
}
9999
});
100100

101-
// NODE-3308
102-
it.skip('should correctly receive the APM events for a listIndexes command', {
101+
it('should correctly receive the APM events for a listIndexes command', {
103102
metadata: { requires: { topology: ['replicaset'], mongodb: '>=3.0.0' } },
104103

105104
test: function () {

test/integration/crud/aggregation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ describe('Aggregation', function () {
332332
});
333333
});
334334
}
335-
).skipReason = 'TODO(NODE-5617): aggregate explain tests failing on latest servers';
335+
);
336336

337337
it('should correctly return a cursor with batchSize 1 and call next', function (done) {
338338
const client = this.configuration.newClient({ w: 1 }, { maxPoolSize: 1 }),

test/integration/crud/explain.test.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { expect } from 'chai';
22
import { once } from 'events';
3-
import { gte } from 'semver';
43

54
import {
65
type Collection,
@@ -76,17 +75,6 @@ describe('CRUD API explain option', function () {
7675
collection = db.collection('test');
7776
await collection.insertOne({ a: 1 });
7877
commandStartedPromise = once(client, 'commandStarted');
79-
80-
const test = this.currentTest;
81-
if (
82-
test?.fullTitle().includes('aggregate') &&
83-
gte(this.configuration.version, '7.1.0') &&
84-
this.currentTest
85-
) {
86-
this.currentTest.skipReason =
87-
'TODO(NODE-5617): aggregate explain tests failing on latest servers';
88-
this.skip();
89-
}
9078
});
9179

9280
afterEach(async function () {

test/integration/load-balancers/load_balancers.spec.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const filter = ({ description }) => {
88
// Verified they use the same connection but the Node implementation executes
99
// a getMore before the killCursors even though the stream is immediately
1010
// closed.
11-
// TODO(NODE-3970): implement and reference a node specific integration test for this
1211
return 'TODO(NODE-3970): implement and reference a node specific integration test for this';
1312
}
1413

test/integration/node-specific/client_encryption.test.ts

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -264,63 +264,6 @@ describe('ClientEncryption integration tests', function () {
264264
expect(rewrapManyDataKeyResult.bulkWriteResult).to.equal(undefined);
265265
});
266266

267-
it.skip(
268-
'should explicitly encrypt and decrypt with a re-wrapped local key (explicit session/transaction)',
269-
metadata,
270-
function () {
271-
const encryption = new ClientEncryption(client, {
272-
keyVaultNamespace: 'client.encryption',
273-
kmsProviders: { local: { key: 'A'.repeat(128) } }
274-
});
275-
let encrypted;
276-
let rewrapManyDataKeyResult;
277-
278-
return encryption
279-
.createDataKey('local')
280-
.then(dataKey => {
281-
const encryptOptions = {
282-
keyId: dataKey,
283-
algorithm: 'Indexed',
284-
contentionFactor: 0
285-
};
286-
287-
return encryption.encrypt('hello', encryptOptions);
288-
})
289-
.then(_encrypted => {
290-
encrypted = _encrypted;
291-
})
292-
.then(() => {
293-
// withSession does not forward the callback's return value, hence
294-
// the slightly awkward 'rewrapManyDataKeyResult' passing here
295-
return client.withSession(session => {
296-
return session.withTransaction(() => {
297-
expect(session.transaction.isStarting).to.equal(true);
298-
expect(session.transaction.isActive).to.equal(true);
299-
rewrapManyDataKeyResult = encryption.rewrapManyDataKey(
300-
{},
301-
{ provider: 'local', session }
302-
);
303-
return rewrapManyDataKeyResult.then(() => {
304-
// Verify that the 'session' argument was actually used
305-
expect(session.transaction.isStarting).to.equal(false);
306-
expect(session.transaction.isActive).to.equal(true);
307-
});
308-
});
309-
});
310-
})
311-
.then(() => {
312-
return rewrapManyDataKeyResult;
313-
})
314-
.then(rewrapManyDataKeyResult => {
315-
expect(rewrapManyDataKeyResult.bulkWriteResult.result.nModified).to.equal(1);
316-
return encryption.decrypt(encrypted);
317-
})
318-
.then(decrypted => {
319-
expect(decrypted).to.equal('hello');
320-
});
321-
}
322-
).skipReason = 'TODO(DRIVERS-2389): add explicit session support to key management API';
323-
324267
// TODO(NODE-3371): resolve KMS JSON response does not include string 'Plaintext'. HTTP status=200 error
325268
it.skip(
326269
'should explicitly encrypt and decrypt with the "aws" KMS provider',

test/integration/node-specific/crypto_callbacks.test.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,11 @@ describe('cryptoCallbacks', function () {
5454
await client?.close();
5555
});
5656

57-
// TODO(NODE-3370): fix key formatting error "asn1_check_tlen:wrong tag"
58-
it.skip('should support support crypto callback for signing RSA-SHA256', function () {
57+
it('should support support crypto callback for signing RSA-SHA256', function () {
5958
const input = Buffer.from('data to sign');
6059
const pemFileData =
61-
'-----BEGIN PRIVATE KEY-----\n' +
62-
'MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAg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
61+
const key = Buffer.from(pemFileData, 'base64');
6562
const output = Buffer.alloc(256);
6663
const expectedOutput = Buffer.from(
6764
'VocBRhpMmQ2XCzVehWSqheQLnU889gf3dhU4AnVnQTJjsKx/CM23qKDPkZDd2A/BnQsp99SN7ksIX5Raj0TPwyN5OCN/YrNFNGoOFlTsGhgP/hyE8X3Duiq6sNO0SMvRYNPFFGlJFsp1Fw3Z94eYMg4/Wpw5s4+Jo5Zm/qY7aTJIqDKDQ3CNHLeJgcMUOc9sz01/GzoUYKDVODHSxrYEk5ireFJFz9vP8P7Ha+VDUZuQIQdXer9NBbGFtYmWprY3nn4D3Dw93Sn0V0dIqYeIo91oKyslvMebmUM95S2PyIJdEpPb2DJDxjvX/0LLwSWlSXRWy9gapWoBkb4ynqZBsg==',
@@ -75,7 +72,7 @@ describe('cryptoCallbacks', function () {
7572
}
7673

7774
expect(output).to.deep.equal(expectedOutput);
78-
}).skipReason = 'TODO(NODE-3370): fix key formatting error "asn1_check_tlen:wrong tag"';
75+
});
7976

8077
it('should invoke crypto callbacks when doing encryption', async function () {
8178
function assertCertainHooksCalled(expectedSet?) {

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner';
33
import { type TestFilter } from '../../tools/unified-spec-runner/schema';
44

55
const filter: TestFilter = ({ description }) => {
6-
if (description === 'unpin after transient error within a transaction and commit') {
7-
// OLD COMMENT: commitTransaction retry seems to be swallowed by mongos in this case
8-
// TODO(NODE-3943):
9-
return `TODO(NODE-3943): commitTransaction retry seems to be swallowed by mongos in this case`;
10-
}
11-
126
if (description === 'Client side error in command starting transaction') {
137
// TODO(NODE-2034): Will be implemented as part of NODE-2034
148
return 'TODO(NODE-2034): Specify effect of client-side errors on in-progress transactions';
@@ -19,10 +13,6 @@ const filter: TestFilter = ({ description }) => {
1913
return 'TODO(NODE-3951): investigate why this is failing while the legacy version is passing';
2014
}
2115

22-
if (description === 'A successful find event with a getmore and the server kills the cursor') {
23-
return 'TODO(NODE-3308): failures due unnecessary getMore and killCursors calls in 5.0';
24-
}
25-
2616
if (
2717
[
2818
'withTransaction and no transaction options set',
@@ -34,7 +24,7 @@ const filter: TestFilter = ({ description }) => {
3424
'remain pinned after non-transient Interrupted error on insertOne'
3525
].includes(description)
3626
) {
37-
return 'TODO(DRIVERS-2816): fix migration conflict in transaction tests';
27+
return 'TODO(NODE-5962): fix migration conflict in transaction tests';
3828
}
3929

4030
if (

test/tools/unified-spec-runner/runner.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ async function runUnifiedTest(
178178
if (topologyType === TopologyType.Sharded || topologyType === TopologyType.LoadBalanced) {
179179
for (const [, collection] of entities.mapOf('collection')) {
180180
try {
181-
// TODO(NODE-4238): create / cleanup entities for each test suite
182181
await utilClient.db(ns(collection.namespace).db).command({
183182
distinct: collection.collectionName,
184183
key: '_id'
Lines changed: 77 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,85 @@
1-
// TODO(NODE-5422): add TS support for FLE in the driver and unskip type tests
1+
import { expectAssignable, expectError, expectType } from 'tsd';
22

3-
// import { expectAssignable, expectError, expectType, expectNotType, expectNotAssignable } from 'tsd';
4-
// import { RangeOptions, AWSEncryptionKeyOptions, AzureEncryptionKeyOptions, ClientEncryption, GCPEncryptionKeyOptions, ClientEncryptionEncryptOptions, KMSProviders } from '../..';
3+
import type {
4+
AWSEncryptionKeyOptions,
5+
AzureEncryptionKeyOptions,
6+
ClientEncryption,
7+
ClientEncryptionEncryptOptions,
8+
GCPEncryptionKeyOptions,
9+
KMSProviders,
10+
RangeOptions
11+
} from '../..';
512

6-
// type RequiredCreateEncryptedCollectionSettings = Parameters<
7-
// ClientEncryption['createEncryptedCollection']
8-
// >[2];
13+
type RequiredCreateEncryptedCollectionSettings = Parameters<
14+
ClientEncryption['createEncryptedCollection']
15+
>[2];
916

10-
// expectError<RequiredCreateEncryptedCollectionSettings>({});
11-
// expectError<RequiredCreateEncryptedCollectionSettings>({
12-
// provider: 'blah!',
13-
// createCollectionOptions: { encryptedFields: {} }
14-
// });
15-
// expectError<RequiredCreateEncryptedCollectionSettings>({
16-
// provider: 'aws',
17-
// createCollectionOptions: {}
18-
// });
19-
// expectError<RequiredCreateEncryptedCollectionSettings>({
20-
// provider: 'aws',
21-
// createCollectionOptions: { encryptedFields: null }
22-
// });
17+
expectError<RequiredCreateEncryptedCollectionSettings>({});
18+
expectError<RequiredCreateEncryptedCollectionSettings>({
19+
provider: 'blah!',
20+
createCollectionOptions: { encryptedFields: {} }
21+
});
22+
expectError<RequiredCreateEncryptedCollectionSettings>({
23+
provider: 'aws',
24+
createCollectionOptions: {}
25+
});
26+
expectError<RequiredCreateEncryptedCollectionSettings>({
27+
provider: 'aws',
28+
createCollectionOptions: { encryptedFields: null }
29+
});
2330

24-
// expectAssignable<RequiredCreateEncryptedCollectionSettings>({
25-
// provider: 'aws',
26-
// createCollectionOptions: { encryptedFields: {} }
27-
// });
28-
// expectAssignable<RequiredCreateEncryptedCollectionSettings>({
29-
// provider: 'aws',
30-
// createCollectionOptions: { encryptedFields: {} },
31-
// masterKey: { } as AWSEncryptionKeyOptions | AzureEncryptionKeyOptions | GCPEncryptionKeyOptions
32-
// });
31+
expectAssignable<RequiredCreateEncryptedCollectionSettings>({
32+
provider: 'aws',
33+
createCollectionOptions: { encryptedFields: {} }
34+
});
35+
expectAssignable<RequiredCreateEncryptedCollectionSettings>({
36+
provider: 'aws',
37+
createCollectionOptions: { encryptedFields: {} },
38+
masterKey: {} as AWSEncryptionKeyOptions | AzureEncryptionKeyOptions | GCPEncryptionKeyOptions
39+
});
3340

34-
// {
35-
// // NODE-5041 - incorrect spelling of rangeOpts in typescript definitions
36-
// const options = {} as ClientEncryptionEncryptOptions;
37-
// expectType<RangeOptions | undefined>(options.rangeOptions)
38-
// }
41+
{
42+
// NODE-5041 - incorrect spelling of rangeOpts in typescript definitions
43+
const options = {} as ClientEncryptionEncryptOptions;
44+
expectType<RangeOptions | undefined>(options.rangeOptions);
45+
}
3946

40-
// {
41-
// // KMSProviders
42-
// // aws
43-
// expectAssignable<KMSProviders['aws']>({ accessKeyId: '', secretAccessKey: '' });
44-
// expectAssignable<KMSProviders['aws']>({ accessKeyId: '', secretAccessKey: '', sessionToken: undefined });
45-
// expectAssignable<KMSProviders['aws']>({ accessKeyId: '', secretAccessKey: '', sessionToken: '' });
46-
// // automatic
47-
// expectAssignable<KMSProviders['aws']>({});
47+
{
48+
// KMSProviders
49+
// aws
50+
expectAssignable<KMSProviders['aws']>({ accessKeyId: '', secretAccessKey: '' });
51+
expectAssignable<KMSProviders['aws']>({
52+
accessKeyId: '',
53+
secretAccessKey: '',
54+
sessionToken: undefined
55+
});
56+
expectAssignable<KMSProviders['aws']>({ accessKeyId: '', secretAccessKey: '', sessionToken: '' });
57+
// automatic
58+
expectAssignable<KMSProviders['aws']>({});
4859

49-
// // azure
50-
// expectAssignable<KMSProviders['azure']>({ tenantId: 'a', clientId: 'a', clientSecret: 'a' });
51-
// expectAssignable<KMSProviders['azure']>({ tenantId: 'a', clientId: 'a', clientSecret: 'a' });
52-
// expectAssignable<KMSProviders['azure']>({ tenantId: 'a', clientId: 'a', clientSecret: 'a', identityPlatformEndpoint: undefined });
53-
// expectAssignable<KMSProviders['azure']>({ tenantId: 'a', clientId: 'a', clientSecret: 'a', identityPlatformEndpoint: '' });
54-
// expectAssignable<KMSProviders['azure']>({ accessToken: 'a' });
55-
// expectAssignable<KMSProviders['azure']>({});
60+
// azure
61+
expectAssignable<KMSProviders['azure']>({ tenantId: 'a', clientId: 'a', clientSecret: 'a' });
62+
expectAssignable<KMSProviders['azure']>({ tenantId: 'a', clientId: 'a', clientSecret: 'a' });
63+
expectAssignable<KMSProviders['azure']>({
64+
tenantId: 'a',
65+
clientId: 'a',
66+
clientSecret: 'a',
67+
identityPlatformEndpoint: undefined
68+
});
69+
expectAssignable<KMSProviders['azure']>({
70+
tenantId: 'a',
71+
clientId: 'a',
72+
clientSecret: 'a',
73+
identityPlatformEndpoint: ''
74+
});
75+
expectAssignable<KMSProviders['azure']>({ accessToken: 'a' });
76+
expectAssignable<KMSProviders['azure']>({});
5677

57-
// // gcp
58-
// expectAssignable<KMSProviders['gcp']>({ email: 'a', privateKey: 'a' });
59-
// expectAssignable<KMSProviders['gcp']>({ email: 'a', privateKey: 'a', endpoint: undefined });
60-
// expectAssignable<KMSProviders['gcp']>({ email: 'a', privateKey: 'a', endpoint: 'a' });
61-
// expectAssignable<KMSProviders['gcp']>({ accessToken: 'a' });
62-
// // automatic
63-
// expectAssignable<KMSProviders['gcp']>({});
64-
65-
// }
78+
// gcp
79+
expectAssignable<KMSProviders['gcp']>({ email: 'a', privateKey: 'a' });
80+
expectAssignable<KMSProviders['gcp']>({ email: 'a', privateKey: 'a', endpoint: undefined });
81+
expectAssignable<KMSProviders['gcp']>({ email: 'a', privateKey: 'a', endpoint: 'a' });
82+
expectAssignable<KMSProviders['gcp']>({ accessToken: 'a' });
83+
// automatic
84+
expectAssignable<KMSProviders['gcp']>({});
85+
}

0 commit comments

Comments
 (0)