summaryrefslogtreecommitdiff
path: root/jstests/auth/auth_options.js
diff options
context:
space:
mode:
authorShaun Verch <shaun.verch@mongodb.com>2014-05-07 18:01:04 -0400
committerShaun Verch <shaun.verch@mongodb.com>2014-05-13 17:08:50 -0400
commita503b4b57e57f81bebddd07ed75cf116f23de350 (patch)
treeae0db9e6b4474142a3862ddf550554f1af09ba39 /jstests/auth/auth_options.js
parentb3e8e45ea6f346f804161e1fe4043ba3e5850ba8 (diff)
downloadmongo-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/auth_options.js')
-rw-r--r--jstests/auth/auth_options.js23
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.");