diff options
author | Shaun Verch <shaun.verch@mongodb.com> | 2014-05-07 18:01:04 -0400 |
---|---|---|
committer | Shaun Verch <shaun.verch@mongodb.com> | 2014-05-13 17:08:50 -0400 |
commit | a503b4b57e57f81bebddd07ed75cf116f23de350 (patch) | |
tree | ae0db9e6b4474142a3862ddf550554f1af09ba39 /jstests/auth | |
parent | b3e8e45ea6f346f804161e1fe4043ba3e5850ba8 (diff) | |
download | mongo-a503b4b57e57f81bebddd07ed75cf116f23de350.tar.gz |
SERVER-13439 Make sure values explicitly set to false in config file show up in parsed result
Diffstat (limited to 'jstests/auth')
-rw-r--r-- | jstests/auth/auth_options.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/jstests/auth/auth_options.js b/jstests/auth/auth_options.js index ad694df7413..4f5dc27fb78 100644 --- a/jstests/auth/auth_options.js +++ b/jstests/auth/auth_options.js @@ -39,4 +39,27 @@ expectedResult = { }; testGetCmdLineOptsMongod({}, expectedResult); +// Test that we preserve switches explicitly set to false in config files. See SERVER-13439. +jsTest.log("Testing explicitly disabled \"auth\" config file option"); +expectedResult = { + "parsed" : { + "config" : "jstests/libs/config_files/disable_auth.ini", + "security" : { + "authorization" : "disabled" + } + } +}; +testGetCmdLineOptsMongod({ config : "jstests/libs/config_files/disable_auth.ini" }, expectedResult); + +jsTest.log("Testing explicitly disabled \"noauth\" config file option"); +expectedResult = { + "parsed" : { + "config" : "jstests/libs/config_files/disable_noauth.ini", + "security" : { + "authorization" : "enabled" + } + } +}; +testGetCmdLineOptsMongod({ config : "jstests/libs/config_files/disable_noauth.ini" }, expectedResult); + print(baseName + " succeeded."); |