summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/authorization_manager_test.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2020-01-20 10:03:08 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-15 11:19:48 +0000
commit611979eb5cafba7bb5369a19948f82453f117c65 (patch)
treefe04826f378fbd3b05d9f49173f6074726da5c00 /src/mongo/db/auth/authorization_manager_test.cpp
parent44a107ad428459cad6260490ae98bca442e07385 (diff)
downloadmongo-611979eb5cafba7bb5369a19948f82453f117c65.tar.gz
SERVER-44978 Thread-through ServiceContext and ThreadPool to ReadThroughCache
There are no functional changes to this CR, it just instantiates every usage of ReadThroughCache with a ServiceContext and ThreadPool, which will be used for making the acquire method asynchronous.
Diffstat (limited to 'src/mongo/db/auth/authorization_manager_test.cpp')
-rw-r--r--src/mongo/db/auth/authorization_manager_test.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/mongo/db/auth/authorization_manager_test.cpp b/src/mongo/db/auth/authorization_manager_test.cpp
index 30a9c19a766..f381d76ae47 100644
--- a/src/mongo/db/auth/authorization_manager_test.cpp
+++ b/src/mongo/db/auth/authorization_manager_test.cpp
@@ -85,8 +85,7 @@ public:
auto localExternalState = std::make_unique<AuthzManagerExternalStateMock>();
externalState = localExternalState.get();
auto localAuthzManager = std::make_unique<AuthorizationManagerImpl>(
- std::move(localExternalState),
- AuthorizationManagerImpl::InstallMockForTestingOrAuthImpl{});
+ getServiceContext(), std::move(localExternalState));
authzManager = localAuthzManager.get();
externalState->setAuthorizationManager(authzManager);
authzManager->setAuthEnabled(true);
@@ -258,24 +257,6 @@ private:
}
};
-class AuthorizationManagerWithExplicitUserPrivilegesTest : public ::mongo::unittest::Test {
-public:
- virtual void setUp() {
- auto localExternalState =
- std::make_unique<AuthzManagerExternalStateMockWithExplicitUserPrivileges>();
- externalState = localExternalState.get();
- externalState->setAuthzVersion(AuthorizationManager::schemaVersion26Final);
- authzManager = std::make_unique<AuthorizationManagerImpl>(
- std::move(localExternalState),
- AuthorizationManagerImpl::InstallMockForTestingOrAuthImpl{});
- externalState->setAuthorizationManager(authzManager.get());
- authzManager->setAuthEnabled(true);
- }
-
- std::unique_ptr<AuthorizationManager> authzManager;
- AuthzManagerExternalStateMockWithExplicitUserPrivileges* externalState;
-};
-
// Tests SERVER-21535, unrecognized actions should be ignored rather than causing errors.
TEST_F(AuthorizationManagerTest, testAcquireV2UserWithUnrecognizedActions) {