summaryrefslogtreecommitdiff
path: root/src/mongo/db/keys_collection_manager_sharding_test.cpp
diff options
context:
space:
mode:
authorKevin Pulo <kevin.pulo@mongodb.com>2018-02-01 07:39:32 +0000
committerKevin Pulo <kevin.pulo@mongodb.com>2018-02-01 07:39:32 +0000
commit6476d7205b2bf4a8d02bf877bb84f1290878bb04 (patch)
tree643d0826ea220b521e605d3f537b7b978eec3a83 /src/mongo/db/keys_collection_manager_sharding_test.cpp
parentad7235f3b739c3aeb0c21ddaba58fd1cb494cc61 (diff)
downloadmongo-6476d7205b2bf4a8d02bf877bb84f1290878bb04.tar.gz
SERVER-18137 Use NamespaceString for fully-qualified ns in sharding
Diffstat (limited to 'src/mongo/db/keys_collection_manager_sharding_test.cpp')
-rw-r--r--src/mongo/db/keys_collection_manager_sharding_test.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mongo/db/keys_collection_manager_sharding_test.cpp b/src/mongo/db/keys_collection_manager_sharding_test.cpp
index ccdd0b653b8..4653653c836 100644
--- a/src/mongo/db/keys_collection_manager_sharding_test.cpp
+++ b/src/mongo/db/keys_collection_manager_sharding_test.cpp
@@ -109,7 +109,7 @@ TEST_F(KeysManagerShardedTest, GetKeyWithSingleKey) {
KeysCollectionDocument origKey1(
1, "dummy", TimeProofService::generateRandomKey(), LogicalTime(Timestamp(105, 0)));
ASSERT_OK(insertToConfigCollection(
- operationContext(), NamespaceString(KeysCollectionDocument::ConfigNS), origKey1.toBSON()));
+ operationContext(), KeysCollectionDocument::ConfigNS, origKey1.toBSON()));
auto keyStatus =
keyManager()->getKeyForValidation(operationContext(), 1, LogicalTime(Timestamp(100, 0)));
@@ -127,12 +127,12 @@ TEST_F(KeysManagerShardedTest, GetKeyWithMultipleKeys) {
KeysCollectionDocument origKey1(
1, "dummy", TimeProofService::generateRandomKey(), LogicalTime(Timestamp(105, 0)));
ASSERT_OK(insertToConfigCollection(
- operationContext(), NamespaceString(KeysCollectionDocument::ConfigNS), origKey1.toBSON()));
+ operationContext(), KeysCollectionDocument::ConfigNS, origKey1.toBSON()));
KeysCollectionDocument origKey2(
2, "dummy", TimeProofService::generateRandomKey(), LogicalTime(Timestamp(205, 0)));
ASSERT_OK(insertToConfigCollection(
- operationContext(), NamespaceString(KeysCollectionDocument::ConfigNS), origKey2.toBSON()));
+ operationContext(), KeysCollectionDocument::ConfigNS, origKey2.toBSON()));
auto keyStatus =
keyManager()->getKeyForValidation(operationContext(), 1, LogicalTime(Timestamp(100, 0)));
@@ -159,7 +159,7 @@ TEST_F(KeysManagerShardedTest, GetKeyShouldErrorIfKeyIdMismatchKey) {
KeysCollectionDocument origKey1(
1, "dummy", TimeProofService::generateRandomKey(), LogicalTime(Timestamp(105, 0)));
ASSERT_OK(insertToConfigCollection(
- operationContext(), NamespaceString(KeysCollectionDocument::ConfigNS), origKey1.toBSON()));
+ operationContext(), KeysCollectionDocument::ConfigNS, origKey1.toBSON()));
auto keyStatus =
keyManager()->getKeyForValidation(operationContext(), 2, LogicalTime(Timestamp(100, 0)));
@@ -172,11 +172,11 @@ TEST_F(KeysManagerShardedTest, GetKeyWithoutRefreshShouldReturnRightKey) {
KeysCollectionDocument origKey1(
1, "dummy", TimeProofService::generateRandomKey(), LogicalTime(Timestamp(105, 0)));
ASSERT_OK(insertToConfigCollection(
- operationContext(), NamespaceString(KeysCollectionDocument::ConfigNS), origKey1.toBSON()));
+ operationContext(), KeysCollectionDocument::ConfigNS, origKey1.toBSON()));
KeysCollectionDocument origKey2(
2, "dummy", TimeProofService::generateRandomKey(), LogicalTime(Timestamp(110, 0)));
ASSERT_OK(insertToConfigCollection(
- operationContext(), NamespaceString(KeysCollectionDocument::ConfigNS), origKey2.toBSON()));
+ operationContext(), KeysCollectionDocument::ConfigNS, origKey2.toBSON()));
{
auto keyStatus = keyManager()->getKeyForValidation(
@@ -207,7 +207,7 @@ TEST_F(KeysManagerShardedTest, GetKeyForSigningShouldReturnRightKey) {
KeysCollectionDocument origKey1(
1, "dummy", TimeProofService::generateRandomKey(), LogicalTime(Timestamp(105, 0)));
ASSERT_OK(insertToConfigCollection(
- operationContext(), NamespaceString(KeysCollectionDocument::ConfigNS), origKey1.toBSON()));
+ operationContext(), KeysCollectionDocument::ConfigNS, origKey1.toBSON()));
keyManager()->refreshNow(operationContext());
@@ -226,11 +226,11 @@ TEST_F(KeysManagerShardedTest, GetKeyForSigningShouldReturnRightOldKey) {
KeysCollectionDocument origKey1(
1, "dummy", TimeProofService::generateRandomKey(), LogicalTime(Timestamp(105, 0)));
ASSERT_OK(insertToConfigCollection(
- operationContext(), NamespaceString(KeysCollectionDocument::ConfigNS), origKey1.toBSON()));
+ operationContext(), KeysCollectionDocument::ConfigNS, origKey1.toBSON()));
KeysCollectionDocument origKey2(
2, "dummy", TimeProofService::generateRandomKey(), LogicalTime(Timestamp(110, 0)));
ASSERT_OK(insertToConfigCollection(
- operationContext(), NamespaceString(KeysCollectionDocument::ConfigNS), origKey2.toBSON()));
+ operationContext(), KeysCollectionDocument::ConfigNS, origKey2.toBSON()));
keyManager()->refreshNow(operationContext());
@@ -297,7 +297,7 @@ TEST_F(KeysManagerShardedTest, ShouldStillBeAbleToUpdateCacheEvenIfItCantCreateK
KeysCollectionDocument origKey1(
1, "dummy", TimeProofService::generateRandomKey(), LogicalTime(Timestamp(105, 0)));
ASSERT_OK(insertToConfigCollection(
- operationContext(), NamespaceString(KeysCollectionDocument::ConfigNS), origKey1.toBSON()));
+ operationContext(), KeysCollectionDocument::ConfigNS, origKey1.toBSON()));
// Set the time to be very ahead so the updater will be forced to create new keys.
const LogicalTime fakeTime(Timestamp(20000, 0));