summaryrefslogtreecommitdiff
path: root/src/mongo/db/server_options_test.cpp
diff options
context:
space:
mode:
authorShaun Verch <shaun.verch@mongodb.com>2014-03-27 20:11:11 -0400
committerShaun Verch <shaun.verch@mongodb.com>2014-03-28 13:46:54 -0400
commit41d6c151f40d40ef0673bb4e5e28d8e9c15e3cc0 (patch)
tree1f0db7646ef84b3f4eb30a0e6630f02a0d22a44c /src/mongo/db/server_options_test.cpp
parent9f0e88d0a4c00c125ce52d3954503dd1c91eae7c (diff)
downloadmongo-41d6c151f40d40ef0673bb4e5e28d8e9c15e3cc0.tar.gz
SERVER-13379 Canonicalize verbose and v options as systemLog.verbosity
Diffstat (limited to 'src/mongo/db/server_options_test.cpp')
-rw-r--r--src/mongo/db/server_options_test.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/mongo/db/server_options_test.cpp b/src/mongo/db/server_options_test.cpp
index c12d47a0080..df84f80360b 100644
--- a/src/mongo/db/server_options_test.cpp
+++ b/src/mongo/db/server_options_test.cpp
@@ -67,6 +67,8 @@ namespace {
ASSERT_OK(parser.run(options, argv, env_map, &environment));
+ ASSERT_OK(::mongo::validateServerOptions(environment));
+ ASSERT_OK(::mongo::canonicalizeServerOptions(&environment));
ASSERT_OK(::mongo::storeServerOptions(environment, argv));
// Make sure the log level didn't change since we didn't specify any verbose options
@@ -92,6 +94,8 @@ namespace {
ASSERT_OK(parser.run(options, argv, env_map, &environment));
+ ASSERT_OK(::mongo::validateServerOptions(environment));
+ ASSERT_OK(::mongo::canonicalizeServerOptions(&environment));
ASSERT_OK(::mongo::storeServerOptions(environment, argv));
int verbosity = 1;
@@ -118,6 +122,8 @@ namespace {
ASSERT_OK(parser.run(options, argv, env_map, &environment));
+ ASSERT_OK(::mongo::validateServerOptions(environment));
+ ASSERT_OK(::mongo::canonicalizeServerOptions(&environment));
ASSERT_OK(::mongo::storeServerOptions(environment, argv));
int verbosity = 4;
@@ -144,6 +150,8 @@ namespace {
ASSERT_OK(parser.run(options, argv, env_map, &environment));
+ ASSERT_OK(::mongo::validateServerOptions(environment));
+ ASSERT_OK(::mongo::canonicalizeServerOptions(&environment));
ASSERT_OK(::mongo::storeServerOptions(environment, argv));
int verbosity = 0;
@@ -170,7 +178,7 @@ namespace {
ASSERT_OK(parser.run(options, argv, env_map, &environment));
- ASSERT_NOT_OK(::mongo::storeServerOptions(environment, argv));
+ ASSERT_NOT_OK(::mongo::validateServerOptions(environment));
}
TEST(Verbosity, INIConfigString) {
@@ -194,6 +202,8 @@ namespace {
ASSERT_OK(parser.run(options, argv, env_map, &environment));
+ ASSERT_OK(::mongo::validateServerOptions(environment));
+ ASSERT_OK(::mongo::canonicalizeServerOptions(&environment));
ASSERT_OK(::mongo::storeServerOptions(environment, argv));
int verbosity = 4;
@@ -222,7 +232,7 @@ namespace {
ASSERT_OK(parser.run(options, argv, env_map, &environment));
- ASSERT_NOT_OK(::mongo::storeServerOptions(environment, argv));
+ ASSERT_NOT_OK(::mongo::validateServerOptions(environment));
}
TEST(Verbosity, INIConfigEmptyString) {
@@ -246,6 +256,8 @@ namespace {
ASSERT_OK(parser.run(options, argv, env_map, &environment));
+ ASSERT_OK(::mongo::validateServerOptions(environment));
+ ASSERT_OK(::mongo::canonicalizeServerOptions(&environment));
ASSERT_OK(::mongo::storeServerOptions(environment, argv));
int verbosity = 0;
@@ -274,6 +286,8 @@ namespace {
ASSERT_OK(parser.run(options, argv, env_map, &environment));
+ ASSERT_OK(::mongo::validateServerOptions(environment));
+ ASSERT_OK(::mongo::canonicalizeServerOptions(&environment));
ASSERT_OK(::mongo::storeServerOptions(environment, argv));
int verbosity = 4;
@@ -304,6 +318,8 @@ namespace {
ASSERT_OK(parser.run(options, argv, env_map, &environment));
+ ASSERT_OK(::mongo::validateServerOptions(environment));
+ ASSERT_OK(::mongo::canonicalizeServerOptions(&environment));
ASSERT_OK(::mongo::storeServerOptions(environment, argv));
int verbosity = 3;