From 6c7eccb75d778737e1511b52603717d72990b2ab Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Wed, 15 Nov 2017 16:36:49 -0500 Subject: [PATCH] test(url parser): add override options test --- test/functional/url_parser_tests.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/functional/url_parser_tests.js b/test/functional/url_parser_tests.js index f6ca9ddf65..686ddd35c0 100644 --- a/test/functional/url_parser_tests.js +++ b/test/functional/url_parser_tests.js @@ -1150,6 +1150,30 @@ describe('Url SRV Parser', function() { } }); + /** + * @ignore + */ + it('should build a connection string based on SRV, TXT records and option override', { + metadata: { + requires: { topology: ['single'] } + }, + test: function(done) { + // This url has txt and srv records and options passed in through api + parse('mongodb+srv://test6.test.build.10gen.cc', { connectTimeoutMS: 250000 }, function( + err, + object + ) { + expect(err).to.be.null; + expect(object).to.exist; + expect(object.servers[0].host).to.equal('localhost.build.10gen.cc'); + expect(object.servers[0].port).to.equal(27017); + // TODO check all options get override + expect(object.db_options.connectTimeoutMS).to.equal(250000); + done(); + }); + } + }); + // /** // * @ignore // */