diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-10-31 15:49:49 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-10-31 15:49:49 -0400 |
commit | 400b86d2963b30730cccfe7ae6829e6101998ac8 (patch) | |
tree | 2741ecc5a785e60afc80e4d76ec1fa9f15144b5d /jstests/serial_run | |
parent | 2a8818d4fd7b833b82997c9996aca9eb14471f09 (diff) | |
download | mongo-400b86d2963b30730cccfe7ae6829e6101998ac8.tar.gz |
SERVER-31061 Add `mongo+srv://` support for URIs.
The shell now supports parsing and handling `mongo+srv://` style URIs,
as part of the DNS Seedlist support. These URIs require DNS SRV and
TXT record lookups, for extra configuration options. The shell also
supports a (limited) form of connection-failover -- when initially
connecting to a non-replica-set cluster, the shell will try each
host listed, in order, until a connection can be established.
Diffstat (limited to 'jstests/serial_run')
-rw-r--r-- | jstests/serial_run/srv-uri.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/serial_run/srv-uri.js b/jstests/serial_run/srv-uri.js new file mode 100644 index 00000000000..b550c540d6c --- /dev/null +++ b/jstests/serial_run/srv-uri.js @@ -0,0 +1,8 @@ +(function() { + "use strict"; + const md = MongoRunner.runMongod({port: "27017", dbpath: MongoRunner.dataPath}); + assert.neq(null, md, "unable to start mongod"); + const exitCode = runMongoProgram('mongo', 'mongodb+srv://test1.test.build.10gen.cc.', '--eval', ';'); + assert.eq(exitCode, 0, "Failed to connect with a `mongodb+srv://` style URI."); + MongoRunner.stopMongod(md); +}()); |