Skip to content

Commit 2693d51

Browse files
unskip all tests
1 parent 953c1af commit 2693d51

File tree

7 files changed

+27
-26
lines changed

7 files changed

+27
-26
lines changed

.evergreen/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,6 +1788,7 @@ tasks:
17881788
- {key: VERSION, value: latest}
17891789
- {key: SSL, value: ssl}
17901790
- {key: TOPOLOGY, value: server}
1791+
- {key: AUTH, value: auth}
17911792
- func: install dependencies
17921793
- func: bootstrap mongo-orchestration
17931794
- func: run tls tests
@@ -1802,6 +1803,7 @@ tasks:
18021803
- {key: VERSION, value: '8.0'}
18031804
- {key: SSL, value: ssl}
18041805
- {key: TOPOLOGY, value: server}
1806+
- {key: AUTH, value: auth}
18051807
- func: install dependencies
18061808
- func: bootstrap mongo-orchestration
18071809
- func: run tls tests
@@ -1816,6 +1818,7 @@ tasks:
18161818
- {key: VERSION, value: '7.0'}
18171819
- {key: SSL, value: ssl}
18181820
- {key: TOPOLOGY, value: server}
1821+
- {key: AUTH, value: auth}
18191822
- func: install dependencies
18201823
- func: bootstrap mongo-orchestration
18211824
- func: run tls tests
@@ -1830,6 +1833,7 @@ tasks:
18301833
- {key: VERSION, value: '6.0'}
18311834
- {key: SSL, value: ssl}
18321835
- {key: TOPOLOGY, value: server}
1836+
- {key: AUTH, value: auth}
18331837
- func: install dependencies
18341838
- func: bootstrap mongo-orchestration
18351839
- func: run tls tests
@@ -1844,6 +1848,7 @@ tasks:
18441848
- {key: VERSION, value: '5.0'}
18451849
- {key: SSL, value: ssl}
18461850
- {key: TOPOLOGY, value: server}
1851+
- {key: AUTH, value: auth}
18471852
- func: install dependencies
18481853
- func: bootstrap mongo-orchestration
18491854
- func: run tls tests
@@ -1858,6 +1863,7 @@ tasks:
18581863
- {key: VERSION, value: '4.4'}
18591864
- {key: SSL, value: ssl}
18601865
- {key: TOPOLOGY, value: server}
1866+
- {key: AUTH, value: auth}
18611867
- func: install dependencies
18621868
- func: bootstrap mongo-orchestration
18631869
- func: run tls tests
@@ -1872,6 +1878,7 @@ tasks:
18721878
- {key: VERSION, value: '4.2'}
18731879
- {key: SSL, value: ssl}
18741880
- {key: TOPOLOGY, value: server}
1881+
- {key: AUTH, value: auth}
18751882
- func: install dependencies
18761883
- func: bootstrap mongo-orchestration
18771884
- func: run tls tests

.evergreen/generate_evergreen_tasks.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,8 @@ for (const VERSION of TLS_VERSIONS) {
317317
updateExpansions({
318318
VERSION,
319319
SSL: 'ssl',
320-
TOPOLOGY: 'server'
321-
// TODO: NODE-3891 - fix tests broken when AUTH enabled
322-
// AUTH: 'auth'
320+
TOPOLOGY: 'server',
321+
AUTH: 'auth'
323322
}),
324323
{ func: 'install dependencies' },
325324
{ func: 'bootstrap mongo-orchestration' },

test/integration/causal-consistency/causal_consistency.prose.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const ignoredCommands = [LEGACY_HELLO_COMMAND, 'endSessions'];
99
const test = { commands: { started: [], succeeded: [] } };
1010

1111
// TODO(NODE-3882) - properly implement all prose tests and add missing cases 1, 8, 9, 11, 12
12-
describe.only('Causal Consistency - prose tests', function () {
12+
describe('Causal Consistency - prose tests', function () {
1313
before(function () {
1414
return setupDatabase(this.configuration);
1515
});

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('Client Side Encryption (Legacy)', function () {
2727
const { description } = test;
2828
if (isAuthEnabled && description === 'getMore with encryption') {
2929
// TODO(NODE-6048): Int32 and Long not allowed as batchSize option to cursor.
30-
return `TODO(NODE-6048): test requires that auth is disabled.`
30+
return `TODO(NODE-6048): test requires that auth is disabled.`;
3131
}
3232
if (description === 'mapReduce deterministic encryption (unsupported)') {
3333
return `the Node driver does not have a mapReduce helper.`;

test/integration/enumerate_databases.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ import { TestBuilder, UnifiedTestSuiteBuilder } from '../tools/utils';
66

77
const metadata: MongoDBMetadataUI = {
88
requires: {
9-
auth: 'enabled',
10-
11-
// 'TODO: NODE-3891 - fix tests broken when AUTH enabled'
12-
// These tests should work on a load balanced topology
13-
topology: '!load-balanced'
9+
auth: 'enabled'
1410
}
1511
};
1612

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,9 @@ const filter = ({ description }) => {
2626

2727
if (
2828
process.env.AUTH === 'auth' &&
29-
[
30-
'errors during authentication are processed',
31-
'wait queue timeout errors include cursor statistics',
32-
'wait queue timeout errors include transaction statistics',
33-
'operations against non-load balanced clusters fail if URI contains loadBalanced=true',
34-
'operations against non-load balanced clusters succeed if URI contains loadBalanced=false'
35-
].includes(description)
29+
['errors during authentication are processed'].includes(description)
3630
) {
37-
return 'TODO(NODE-3891): fix tests broken when AUTH enabled';
31+
return 'TODO a;sdhfa;sjkdf';
3832
}
3933

4034
return false;

test/manual/tls_support.test.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import * as tls from 'node:tls';
33

44
import { expect } from 'chai';
55
import { promises as fs } from 'fs';
6+
import ConnectionString from 'mongodb-connection-string-url';
67
import * as sinon from 'sinon';
78

89
import {
@@ -33,7 +34,7 @@ describe('TLS Support', function () {
3334

3435
it(
3536
'should connect with tls via client options',
36-
makeConnectionTest(CONNECTION_STRING, tlsSettings)
37+
makeConnectionTest(CONNECTION_STRING, {}, tlsSettings)
3738
);
3839

3940
beforeEach(function () {
@@ -48,11 +49,7 @@ describe('TLS Support', function () {
4849

4950
it(
5051
'should connect with tls via url options',
51-
makeConnectionTest(
52-
`${CONNECTION_STRING}?${Object.keys(tlsSettings)
53-
.map(key => `${key}=${tlsSettings[key]}`)
54-
.join('&')}`
55-
)
52+
makeConnectionTest(CONNECTION_STRING, tlsSettings, {})
5653
);
5754

5855
context('when tls filepaths are provided', () => {
@@ -283,9 +280,17 @@ describe('TLS Support', function () {
283280
});
284281
});
285282

286-
function makeConnectionTest(connectionString: string, clientOptions?: MongoClientOptions) {
283+
function makeConnectionTest(
284+
connectionString: string,
285+
uriOptions: Record<string, any>,
286+
clientOptions?: MongoClientOptions
287+
) {
288+
const uri = new ConnectionString(connectionString);
289+
for (const [k, v] of Object.entries(uriOptions)) {
290+
uri.searchParams.set(k, v);
291+
}
287292
return async function () {
288-
const client = new MongoClient(connectionString, clientOptions);
293+
const client = new MongoClient(uri.toString(), clientOptions);
289294

290295
await client.connect();
291296
await client.db('admin').command({ [LEGACY_HELLO_COMMAND]: 1 });

0 commit comments

Comments
 (0)