Skip to content

Commit 5ce0fab

Browse files
All non-lb or TLS tests
1 parent 48736e3 commit 5ce0fab

File tree

4 files changed

+12
-100
lines changed

4 files changed

+12
-100
lines changed

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

Lines changed: 6 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -10,51 +10,6 @@ import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner';
1010

1111
const isAuthEnabled = process.env.AUTH === 'auth';
1212

13-
// 'TODO: NODE-3891 - fix tests broken when AUTH enabled'
14-
const skippedAuthTests = [
15-
'Insert a document with auto encryption using the AWS provider with temporary credentials',
16-
'Insert a document with auto encryption using Azure KMS provider',
17-
'$rename works if target value has same encryption options',
18-
'Bulk write with encryption',
19-
'Insert with bypassAutoEncryption',
20-
'Insert with bypassAutoEncryption for local schema',
21-
'ping is bypassed',
22-
'deleteOne with deterministic encryption',
23-
'deleteMany with deterministic encryption',
24-
'distinct with deterministic encryption',
25-
'Find with deterministic encryption',
26-
'Find with $in with deterministic encryption',
27-
'findOneAndReplace with deterministic encryption',
28-
'findOneAndUpdate with deterministic encryption',
29-
'Insert a document with auto encryption using GCP KMS provider',
30-
'getMore with encryption',
31-
'unset works with an encrypted field',
32-
'updateOne with deterministic encryption',
33-
'updateMany with deterministic encryption',
34-
'replaceOne with encryption',
35-
'Insert with encryption on a missing key',
36-
'A local schema should override',
37-
'Count with deterministic encryption',
38-
'Insert a document with auto encryption using local KMS provider',
39-
'Insert with encryption using key alt name',
40-
'insertMany with encryption',
41-
'insertOne with encryption',
42-
'findOneAndDelete with deterministic encryption',
43-
'$unset works with an encrypted field',
44-
'Insert a document with auto encryption using KMIP KMS provider'
45-
];
46-
47-
// TODO(NODE-6048): Int32 and Long not allowed as batchSize option to cursor.
48-
const skippedNoAuthTests = ['getMore with encryption'];
49-
50-
const SKIPPED_TESTS = new Set([
51-
...(isAuthEnabled ? skippedAuthTests.concat(skippedNoAuthTests) : skippedNoAuthTests),
52-
...[
53-
// the node driver does not have a mapReduce helper
54-
'mapReduce deterministic encryption (unsupported)'
55-
]
56-
]);
57-
5813
describe('Client Side Encryption (Legacy)', function () {
5914
const testContext = new TestRunnerContext({ requiresCSFLE: true });
6015
const testSuites = gatherTestSuites(
@@ -70,8 +25,12 @@ describe('Client Side Encryption (Legacy)', function () {
7025

7126
generateTopologyTests(testSuites, testContext, (test, configuration) => {
7227
const { description } = test;
73-
if (SKIPPED_TESTS.has(description)) {
74-
return 'Skipped by generic test name skip filter.';
28+
if (isAuthEnabled && description === 'getMore with encryption') {
29+
// TODO(NODE-6048): Int32 and Long not allowed as batchSize option to cursor.
30+
return `TODO(NODE-6048): test requires that auth is disabled.`
31+
}
32+
if (description === 'mapReduce deterministic encryption (unsupported)') {
33+
return `the Node driver does not have a mapReduce helper.`;
7534
}
7635
if (
7736
[

test/integration/connection-monitoring-and-pooling/connection.test.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ const commonConnectOptions = {
3737
};
3838

3939
describe('Connection', function () {
40-
beforeEach(
41-
skipBrokenAuthTestBeforeEachHook({
42-
skippedTests: [
43-
'should support calling back multiple times on exhaust commands',
44-
'should correctly connect to server using domain socket'
45-
]
46-
})
47-
);
48-
4940
before(function () {
5041
return setupDatabase(this.configuration);
5142
});
@@ -187,7 +178,10 @@ describe('Connection', function () {
187178
const configuration = this.configuration;
188179
client = configuration.newClient(
189180
`mongodb://${encodeURIComponent('/tmp/mongodb-27017.sock')}?w=1`,
190-
{ maxPoolSize: 1 }
181+
{
182+
maxPoolSize: 1,
183+
auth: { ...this.configuration.options.auth }
184+
}
191185
);
192186

193187
const db = client.db(configuration.db);

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

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { expect } from 'chai';
2-
import { format as f } from 'util';
32

43
import {
54
Code,
@@ -8,7 +7,6 @@ import {
87
ProfilingLevel,
98
ReturnDocument
109
} from '../../mongodb';
11-
import { skipBrokenAuthTestBeforeEachHook } from '../../tools/runner/hooks/configuration';
1210
import { sleep as delay } from '../../tools/utils';
1311
import { setupDatabase } from '../shared';
1412

@@ -27,16 +25,6 @@ describe('Operations', function () {
2725
return setupDatabase(this.configuration, ['integration_tests_2', 'hr', 'reporting']);
2826
});
2927

30-
beforeEach(
31-
skipBrokenAuthTestBeforeEachHook({
32-
skippedTests: [
33-
'Should correctly connect to a replicaset',
34-
'Should connect to mongos proxies using connectiong string With Promises',
35-
'Should correctly connect to a replicaset With Promises'
36-
]
37-
})
38-
);
39-
4028
/**************************************************************************
4129
*
4230
* COLLECTION TESTS
@@ -3244,14 +3232,7 @@ describe('Operations', function () {
32443232

32453233
test: function () {
32463234
const configuration = this.configuration;
3247-
const url = f(
3248-
'mongodb://%s,%s/%s?replicaSet=%s&readPreference=%s',
3249-
f('%s:%s', configuration.host, configuration.port),
3250-
f('%s:%s', configuration.host, configuration.port + 1),
3251-
'integration_test_',
3252-
configuration.replicasetName,
3253-
'primary'
3254-
);
3235+
const url = configuration.url();
32553236

32563237
const client = configuration.newClient(url);
32573238
return client.connect().then(function (client) {
@@ -3291,13 +3272,7 @@ describe('Operations', function () {
32913272

32923273
test: function () {
32933274
const configuration = this.configuration;
3294-
const url = f(
3295-
'mongodb://%s:%s,%s:%s/sharded_test_db?w=1',
3296-
configuration.host,
3297-
configuration.port,
3298-
configuration.host,
3299-
configuration.port + 1
3300-
);
3275+
const url = configuration.url();
33013276

33023277
const client = configuration.newClient(url);
33033278
return client.connect().then(function (client) {

test/tools/runner/hooks/configuration.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -107,22 +107,6 @@ const testSkipBeforeEachHook = async function () {
107107
}
108108
};
109109

110-
/**
111-
* TODO: NODE-3891 - fix tests that are broken with auth enabled and remove this hook
112-
* @param skippedTests - define list of tests to skip
113-
* @returns
114-
*/
115-
export const skipBrokenAuthTestBeforeEachHook = function (
116-
{ skippedTests }: { skippedTests: string[] } = { skippedTests: [] }
117-
) {
118-
return function () {
119-
if (process.env.AUTH === 'auth' && skippedTests.includes(this.currentTest.title)) {
120-
this.currentTest.skipReason = 'TODO: NODE-3891 - fix tests broken when AUTH enabled';
121-
this.skip();
122-
}
123-
};
124-
};
125-
126110
const testConfigBeforeHook = async function () {
127111
if (process.env.DRIVERS_ATLAS_TESTING_URI) {
128112
this.configuration = new AstrolabeTestConfiguration(process.env.DRIVERS_ATLAS_TESTING_URI, {});

0 commit comments

Comments
 (0)