From a503b4b57e57f81bebddd07ed75cf116f23de350 Mon Sep 17 00:00:00 2001 From: Shaun Verch Date: Wed, 7 May 2014 18:01:04 -0400 Subject: SERVER-13439 Make sure values explicitly set to false in config file show up in parsed result --- jstests/auth/auth_options.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'jstests/auth') 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."); -- cgit v1.2.1