0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/jstests/serial_run/srv-uri.js
ADAM David Alan Martin b8f64cc3fd
SERVER-32111 Make srv-uri test not use SSL
The `srv-uri` test needs to explicitly decline to use SSL, since
the new `mongo+srv://` URI scheme implicitly turns on SSL.  On
SSL based configurations, the test will fail to connect to
localhost when SSL is enabled.
2017-11-29 14:10:24 -05:00

10 lines
441 B
JavaScript

(function() {
"use strict";
const md = MongoRunner.runMongod({port: "27017", dbpath: MongoRunner.dataPath});
assert.neq(null, md, "unable to start mongod");
const targetURI = 'mongodb+srv://test1.test.build.10gen.cc./?ssl=false';
const exitCode = runMongoProgram('mongo', targetURI, '--eval', ';');
assert.eq(exitCode, 0, "Failed to connect with a `mongodb+srv://` style URI.");
MongoRunner.stopMongod(md);
})();