diff options
author | Scott Hernandez <scotthernandez@gmail.com> | 2015-08-06 15:41:38 -0400 |
---|---|---|
committer | Scott Hernandez <scotthernandez@gmail.com> | 2015-08-07 09:48:57 -0400 |
commit | 872c5220cef27d27a139b6d8612ac89be1ff16af (patch) | |
tree | 4599948e4d50077c0ed0ddc674a8121d5f55e42b /src/mongo/db/repl/member_config_test.cpp | |
parent | 8f1fb72cb7d67cb22b1345d945ce00eaefbad52c (diff) | |
download | mongo-872c5220cef27d27a139b6d8612ac89be1ff16af.tar.gz |
SERVER-17528: no vote members must have priority 0
Diffstat (limited to 'src/mongo/db/repl/member_config_test.cpp')
-rw-r--r-- | src/mongo/db/repl/member_config_test.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mongo/db/repl/member_config_test.cpp b/src/mongo/db/repl/member_config_test.cpp index c53556f411d..b051451524c 100644 --- a/src/mongo/db/repl/member_config_test.cpp +++ b/src/mongo/db/repl/member_config_test.cpp @@ -177,7 +177,7 @@ TEST(MemberConfig, ParseVotes) { ASSERT_TRUE(mc.isVoter()); ASSERT_OK(mc.initialize(BSON("_id" << 0 << "host" << "h" - << "votes" << 0), + << "votes" << 0 << "priority" << 0), &tagConfig)); ASSERT_FALSE(mc.isVoter()); @@ -291,7 +291,7 @@ TEST(MemberConfig, ValidateVotes) { ASSERT_OK(mc.initialize(BSON("_id" << 0 << "host" << "h" - << "votes" << 0), + << "votes" << 0 << "priority" << 0), &tagConfig)); ASSERT_OK(mc.validate()); ASSERT_FALSE(mc.isVoter()); @@ -306,14 +306,14 @@ TEST(MemberConfig, ValidateVotes) { ASSERT_OK(mc.initialize(BSON("_id" << 0 << "host" << "h" - << "votes" << 0.5), + << "votes" << 0.5 << "priority" << 0), &tagConfig)); ASSERT_OK(mc.validate()); ASSERT_FALSE(mc.isVoter()); ASSERT_OK(mc.initialize(BSON("_id" << 0 << "host" << "h" - << "votes" << -0.5), + << "votes" << -0.5 << "priority" << 0), &tagConfig)); ASSERT_OK(mc.validate()); ASSERT_FALSE(mc.isVoter()); @@ -432,10 +432,11 @@ TEST(MemberConfig, ValidateArbiterVotesRelationship) { &tagConfig)); ASSERT_OK(mc.validate()); - ASSERT_OK(mc.initialize(BSON("_id" << 0 << "host" - << "h" - << "votes" << 0 << "arbiterOnly" << false), - &tagConfig)); + ASSERT_OK( + mc.initialize(BSON("_id" << 0 << "host" + << "h" + << "votes" << 0 << "priority" << 0 << "arbiterOnly" << false), + &tagConfig)); ASSERT_OK(mc.validate()); ASSERT_OK(mc.initialize(BSON("_id" << 0 << "host" << "h" |