Skip to content

Commit cf9f999

Browse files
committed
test: skip tests that fail with ssl on
1 parent c12137e commit cf9f999

23 files changed

+134
-89
lines changed

test/functional/authentication.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('Authentication', function() {
1010
});
1111

1212
it('should still work for auth when using new url parser and no database is in url', {
13-
metadata: { requires: { topology: ['single'] } },
13+
metadata: { requires: { topology: ['single'], ssl: false } },
1414
test: function(done) {
1515
const configuration = this.configuration;
1616
const username = 'testUser';
@@ -147,7 +147,7 @@ describe('Authentication', function() {
147147
* @ignore
148148
*/
149149
it('should correctly call validateCollection using authenticatedMode', {
150-
metadata: { requires: { topology: ['single', 'heap', 'wiredtiger'] } },
150+
metadata: { requires: { topology: ['single', 'heap', 'wiredtiger'], ssl: false } },
151151

152152
// The actual test we wish to run
153153
test: function(done) {

test/functional/cmap/connection.test.js

Lines changed: 46 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,60 +11,67 @@ describe('Connection', function() {
1111
return setupDatabase(this.configuration);
1212
});
1313

14-
it('should execute a command against a server', function(done) {
15-
const connectOptions = Object.assign(
16-
{ connectionType: Connection, bson: new BSON() },
17-
this.configuration.options
18-
);
14+
it('should execute a command against a server', {
15+
metadata: { requires: { ssl: false } },
16+
test: function(done) {
17+
const connectOptions = Object.assign(
18+
{ connectionType: Connection, bson: new BSON() },
19+
this.configuration.options
20+
);
1921

20-
connect(connectOptions, (err, conn) => {
21-
expect(err).to.not.exist;
22-
this.defer(_done => conn.destroy(_done));
22+
connect(connectOptions, (err, conn) => {
23+
expect(err).to.not.exist;
24+
this.defer(_done => conn.destroy(_done));
2325

24-
conn.command('admin.$cmd', { ismaster: 1 }, (err, result) => {
25-
// NODE-2382: remove `result.result` when command returns just a raw response
26-
const ismaster = result.result;
26+
conn.command('admin.$cmd', { ismaster: 1 }, (err, result) => {
27+
// NODE-2382: remove `result.result` when command returns just a raw response
28+
const ismaster = result.result;
2729

28-
expect(err).to.not.exist;
29-
expect(ismaster).to.exist;
30-
expect(ismaster.ok).to.equal(1);
31-
done();
30+
expect(err).to.not.exist;
31+
expect(ismaster).to.exist;
32+
expect(ismaster.ok).to.equal(1);
33+
done();
34+
});
3235
});
33-
});
36+
}
3437
});
3538

36-
it('should emit command monitoring events', function(done) {
37-
const connectOptions = Object.assign(
38-
{ connectionType: Connection, bson: new BSON(), monitorCommands: true },
39-
this.configuration.options
40-
);
39+
it('should emit command monitoring events', {
40+
metadata: { requires: { ssl: false } },
41+
test: function(done) {
42+
const connectOptions = Object.assign(
43+
{ connectionType: Connection, bson: new BSON(), monitorCommands: true },
44+
this.configuration.options
45+
);
4146

42-
connect(connectOptions, (err, conn) => {
43-
expect(err).to.not.exist;
44-
this.defer(_done => conn.destroy(_done));
47+
connect(connectOptions, (err, conn) => {
48+
expect(err).to.not.exist;
49+
this.defer(_done => conn.destroy(_done));
4550

46-
const events = [];
47-
conn.on('commandStarted', event => events.push(event));
48-
conn.on('commandSucceeded', event => events.push(event));
49-
conn.on('commandFailed', event => events.push(event));
51+
const events = [];
52+
conn.on('commandStarted', event => events.push(event));
53+
conn.on('commandSucceeded', event => events.push(event));
54+
conn.on('commandFailed', event => events.push(event));
5055

51-
conn.command('admin.$cmd', { ismaster: 1 }, (err, result) => {
52-
// NODE-2382: remove `result.result` when command returns just a raw response
53-
const ismaster = result.result;
56+
conn.command('admin.$cmd', { ismaster: 1 }, (err, result) => {
57+
// NODE-2382: remove `result.result` when command returns just a raw response
58+
const ismaster = result.result;
5459

55-
expect(err).to.not.exist;
56-
expect(ismaster).to.exist;
57-
expect(ismaster.ok).to.equal(1);
58-
expect(events).to.have.length(2);
59-
done();
60+
expect(err).to.not.exist;
61+
expect(ismaster).to.exist;
62+
expect(ismaster.ok).to.equal(1);
63+
expect(events).to.have.length(2);
64+
done();
65+
});
6066
});
61-
});
67+
}
6268
});
6369

6470
it('should support socket timeouts', {
6571
metadata: {
6672
requires: {
67-
os: '!win32' // NODE-2941: 240.0.0.1 doesnt work for windows
73+
os: '!win32', // NODE-2941: 240.0.0.1 doesnt work for windows
74+
ssl: false
6875
}
6976
},
7077
test: function(done) {
@@ -84,7 +91,7 @@ describe('Connection', function() {
8491
});
8592

8693
it('should support calling back multiple times on exhaust commands', {
87-
metadata: { requires: { mongodb: '>=4.2.0', topology: ['single'] } },
94+
metadata: { requires: { mongodb: '>=4.2.0', topology: ['single'], ssl: false } },
8895
test: function(done) {
8996
const ns = `${this.configuration.db}.$cmd`;
9097
const connectOptions = Object.assign(

test/functional/connection.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ describe('Connection', function() {
264264
* @ignore
265265
*/
266266
it('test connect server options', {
267-
metadata: { requires: { topology: 'single' } },
267+
metadata: { requires: { topology: 'single', ssl: false } },
268268

269269
// The actual test we wish to run
270270
test: function(done) {
@@ -294,7 +294,7 @@ describe('Connection', function() {
294294
* @ignore
295295
*/
296296
it('testConnectAllOptions', {
297-
metadata: { requires: { topology: 'single' } },
297+
metadata: { requires: { topology: 'single', ssl: false } },
298298

299299
// The actual test we wish to run
300300
test: function(done) {
@@ -325,7 +325,7 @@ describe('Connection', function() {
325325
* @ignore
326326
*/
327327
it('test connect good auth', {
328-
metadata: { requires: { topology: 'single' } },
328+
metadata: { requires: { topology: 'single', ssl: false } },
329329

330330
// The actual test we wish to run
331331
test: function(done) {
@@ -361,7 +361,7 @@ describe('Connection', function() {
361361
* @ignore
362362
*/
363363
it('test connect good auth as option', {
364-
metadata: { requires: { topology: 'single' } },
364+
metadata: { requires: { topology: 'single', ssl: false } },
365365

366366
// The actual test we wish to run
367367
test: function(done) {

test/functional/core/cursor.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ const setupDatabase = require('./shared').setupDatabase;
66

77
describe('Cursor tests', function() {
88
before(function() {
9+
if (this.configuration.usingTLS()) {
10+
return this.skip();
11+
}
912
return setupDatabase(this.configuration);
1013
});
1114

1215
it('Should iterate cursor', {
1316
metadata: {
14-
requires: { topology: ['single', 'replicaset', 'sharded'] }
17+
requires: { topology: ['single', 'replicaset', 'sharded'], ssl: false }
1518
},
1619

1720
test: function(done) {

test/functional/core/error.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ describe('Error tests', function() {
88
metadata: {
99
requires: {
1010
mongodb: '< 4.1.x',
11-
topology: ['single', 'replicaset']
11+
topology: ['single', 'replicaset'],
12+
ssl: false
1213
}
1314
},
1415

test/functional/core/extend_cursor.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const CoreCursor = require('../../../lib/core/cursor').CoreCursor;
77
describe('Extend cursor tests', function() {
88
it('should correctly extend the cursor with custom implementation', {
99
metadata: {
10-
requires: { topology: ['single'] }
10+
requires: { topology: ['single'], ssl: false }
1111
},
1212

1313
test: function(done) {

test/functional/core/operation_example.test.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ describe('Server operation example tests', function() {
2121
it('simple insert into db', {
2222
metadata: {
2323
requires: {
24-
topology: 'single'
24+
topology: 'single',
25+
ssl: false
2526
}
2627
},
2728

@@ -75,7 +76,8 @@ describe('Server operation example tests', function() {
7576
it('update using Server instance', {
7677
metadata: {
7778
requires: {
78-
topology: 'single'
79+
topology: 'single',
80+
ssl: false
7981
}
8082
},
8183

@@ -148,7 +150,8 @@ describe('Server operation example tests', function() {
148150
it('remove using Server instance', {
149151
metadata: {
150152
requires: {
151-
topology: 'single'
153+
topology: 'single',
154+
ssl: false
152155
}
153156
},
154157

@@ -221,7 +224,8 @@ describe('Server operation example tests', function() {
221224
it('cursor using Server instance', {
222225
metadata: {
223226
requires: {
224-
topology: 'single'
227+
topology: 'single',
228+
ssl: false
225229
}
226230
},
227231

@@ -287,7 +291,8 @@ describe('Server operation example tests', function() {
287291
it('command using Server instance', {
288292
metadata: {
289293
requires: {
290-
topology: 'single'
294+
topology: 'single',
295+
ssl: false
291296
}
292297
},
293298

test/functional/core/operations.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ const Connection = core.Connection;
1212

1313
const test = {};
1414
describe('Operation tests', function() {
15+
before(function() {
16+
if (this.configuration.usingTLS()) return this.skip();
17+
});
1518
beforeEach(function() {
1619
test.spy = new ConnectionSpy();
1720
Connection.enableConnectionAccounting(test.spy);

test/functional/core/pool.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ const MongoCredentials = require('../../../lib/core/auth/mongo_credentials').Mon
1414

1515
const test = {};
1616
describe('Pool tests', function() {
17+
before(function() {
18+
if (this.configuration.usingTLS()) return this.skip();
19+
});
1720
beforeEach(() => {
1821
test.spy = new ConnectionSpy();
1922
Connection.enableConnectionAccounting(test.spy);

test/functional/core/tailable_cursor.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const setupDatabase = require('./shared').setupDatabase;
66

77
describe('Tailable cursor tests', function() {
88
before(function() {
9+
if (this.configuration.usingTLS()) return this.skip();
910
return setupDatabase(this.configuration);
1011
});
1112

test/functional/core/undefined.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ var expect = require('chai').expect,
55
ObjectId = require('bson').ObjectId;
66

77
describe('A server', function() {
8+
before(function() {
9+
if (this.configuration.usingTLS()) return this.skip();
10+
});
811
it('should correctly execute insert culling undefined', {
912
metadata: {
1013
requires: { topology: ['single', 'replicaset', 'sharded'] }

test/functional/find_and_modify.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,7 @@ describe('Find and Modify', function() {
138138
it('should pass through writeConcern to all findAndModify at db level', {
139139
// Add a tag that our runner can trigger on
140140
// in this case we are setting that node needs to be higher than 0.10.X to run
141-
metadata: {
142-
requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] }
143-
},
141+
metadata: { requires: { ssl: false } },
144142

145143
// The actual test we wish to run
146144
test: function(done) {

test/functional/mongo_client.test.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@ describe('MongoClient', function() {
315315
it('Should correctly set MaxPoolSize on single server', {
316316
metadata: {
317317
requires: {
318-
topology: ['single']
318+
topology: ['single'],
319+
ssl: false
319320
}
320321
},
321322

@@ -487,7 +488,7 @@ describe('MongoClient', function() {
487488
});
488489

489490
it('should correctly connect to mongodb using domain socket', {
490-
metadata: { requires: { topology: ['single'], os: '!win32' } },
491+
metadata: { requires: { topology: ['single'], os: '!win32', ssl: false } },
491492

492493
// The actual test we wish to run
493494
test: function(done) {
@@ -576,7 +577,8 @@ describe('MongoClient', function() {
576577
it('should fail dure to garbage connection string', {
577578
metadata: {
578579
requires: {
579-
topology: ['single']
580+
topology: ['single'],
581+
ssl: false
580582
}
581583
},
582584

@@ -629,7 +631,8 @@ describe('MongoClient', function() {
629631
it('Should correctly pass through appname', {
630632
metadata: {
631633
requires: {
632-
topology: ['single', 'replicaset', 'sharded']
634+
topology: ['single', 'replicaset', 'sharded'],
635+
ssl: false
633636
}
634637
},
635638

@@ -656,7 +659,8 @@ describe('MongoClient', function() {
656659
it('Should correctly pass through appname in options', {
657660
metadata: {
658661
requires: {
659-
topology: ['single', 'replicaset', 'sharded']
662+
topology: ['single', 'replicaset', 'sharded'],
663+
ssl: false
660664
}
661665
},
662666

@@ -713,7 +717,8 @@ describe('MongoClient', function() {
713717
it('Should correctly pass through socketTimeoutMS and connectTimeoutMS from uri', {
714718
metadata: {
715719
requires: {
716-
topology: ['single']
720+
topology: ['single'],
721+
ssl: false
717722
}
718723
},
719724

@@ -795,7 +800,7 @@ describe('MongoClient', function() {
795800
});
796801

797802
it('Should use compression from URI', {
798-
metadata: { requires: { topology: ['single'], unifiedTopology: false } },
803+
metadata: { requires: { topology: ['single'], unifiedTopology: false, ssl: false } },
799804

800805
// The actual test we wish to run
801806
test: function(done) {

test/functional/mongo_client_options.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('MongoClient Options', function() {
1414
* @ignore
1515
*/
1616
it('pass in server and db top level options', {
17-
metadata: { requires: { topology: 'single' } },
17+
metadata: { requires: { topology: 'single', ssl: false } },
1818

1919
// The actual test we wish to run
2020
test: function(done) {
@@ -44,7 +44,7 @@ describe('MongoClient Options', function() {
4444
* @ignore
4545
*/
4646
it('pass in server and db top level options', {
47-
metadata: { requires: { topology: 'single' } },
47+
metadata: { requires: { topology: 'single', ssl: false } },
4848

4949
// The actual test we wish to run
5050
test: function(done) {

0 commit comments

Comments
 (0)