summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Shuvalov <andrew.shuvalov@mongodb.com>2020-09-27 13:08:49 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-28 13:59:28 +0000
commit56729130a2bf0d39463160162d684c1e21018966 (patch)
tree8bc7070aac11ff2536f499d4fa2b0aa3b787ac26
parent55209f44d80a7351f3a3ad81052e6bea0202bea8 (diff)
downloadmongo-56729130a2bf0d39463160162d684c1e21018966.tar.gz
SERVER-47616: changed auto made by the linter, no op
-rw-r--r--src/mongo/db/auth/authorization_session_impl.cpp3
-rw-r--r--src/mongo/db/logical_session_id_test.cpp15
2 files changed, 10 insertions, 8 deletions
diff --git a/src/mongo/db/auth/authorization_session_impl.cpp b/src/mongo/db/auth/authorization_session_impl.cpp
index a87ada01587..5d8d815c1a4 100644
--- a/src/mongo/db/auth/authorization_session_impl.cpp
+++ b/src/mongo/db/auth/authorization_session_impl.cpp
@@ -163,7 +163,8 @@ User* AuthorizationSessionImpl::getSingleUser() {
if (userNameItr.more()) {
userName = userNameItr.next();
if (userNameItr.more()) {
- uasserted(ErrorCodes::Unauthorized,
+ uasserted(
+ ErrorCodes::Unauthorized,
"logical sessions can't have multiple authenticated users (for more details see: "
"https://docs.mongodb.com/manual/core/authentication/#authentication-methods)");
}
diff --git a/src/mongo/db/logical_session_id_test.cpp b/src/mongo/db/logical_session_id_test.cpp
index 883ac77c502..e9043f2da01 100644
--- a/src/mongo/db/logical_session_id_test.cpp
+++ b/src/mongo/db/logical_session_id_test.cpp
@@ -230,13 +230,14 @@ TEST_F(LogicalSessionIdTest, GenWithMultipleAuthedUsers) {
addSimpleUser(UserName("simple", "test"));
addSimpleUser(UserName("simple", "test2"));
- ASSERT_THROWS_WITH_CHECK(
- makeLogicalSessionId(_opCtx.get()),
- AssertionException,
- [](const AssertionException& exception) {
- ASSERT_EQ(exception.code(), ErrorCodes::Unauthorized);
- ASSERT_STRING_CONTAINS(exception.reason(), "docs.mongodb.com/manual/core/authentication");
- });
+ ASSERT_THROWS_WITH_CHECK(makeLogicalSessionId(_opCtx.get()),
+ AssertionException,
+ [](const AssertionException& exception) {
+ ASSERT_EQ(exception.code(), ErrorCodes::Unauthorized);
+ ASSERT_STRING_CONTAINS(
+ exception.reason(),
+ "docs.mongodb.com/manual/core/authentication");
+ });
}
TEST_F(LogicalSessionIdTest, GenWithoutAuthedUser) {