summaryrefslogtreecommitdiff
path: root/jstests/slowNightly/command_line_parsing.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/slowNightly/command_line_parsing.js')
-rw-r--r--jstests/slowNightly/command_line_parsing.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/jstests/slowNightly/command_line_parsing.js b/jstests/slowNightly/command_line_parsing.js
index 38c7324..ba7b136 100644
--- a/jstests/slowNightly/command_line_parsing.js
+++ b/jstests/slowNightly/command_line_parsing.js
@@ -7,3 +7,15 @@ var baseName = "jstests_slowNightly_command_line_parsing";
var m = startMongod( "--port", port, "--dbpath", "/data/db/" + baseName, "--notablescan" );
m.getDB( baseName ).getCollection( baseName ).save( {a:1} );
assert.throws( function() { m.getDB( baseName ).getCollection( baseName ).find( {a:1} ).toArray() } );
+
+// test config file
+var m2 = startMongod( "--port", port+2, "--dbpath", "/data/db/" + baseName +"2", "--config", "jstests/libs/testconfig");
+var m2result = {
+ "parsed" : {
+ "config" : "jstests/libs/testconfig",
+ "dbpath" : "/data/db/jstests_slowNightly_command_line_parsing2",
+ "fastsync" : "true",
+ "port" : 31002
+ }
+};
+assert( friendlyEqual(m2result.parsed, m2.getDB("admin").runCommand( "getCmdLineOpts" ).parsed) );