From 611979eb5cafba7bb5369a19948f82453f117c65 Mon Sep 17 00:00:00 2001 From: Kaloian Manassiev Date: Mon, 20 Jan 2020 10:03:08 -0500 Subject: 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. --- src/mongo/db/auth/authorization_manager_test.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'src/mongo/db/auth/authorization_manager_test.cpp') 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(); externalState = localExternalState.get(); auto localAuthzManager = std::make_unique( - 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(); - externalState = localExternalState.get(); - externalState->setAuthzVersion(AuthorizationManager::schemaVersion26Final); - authzManager = std::make_unique( - std::move(localExternalState), - AuthorizationManagerImpl::InstallMockForTestingOrAuthImpl{}); - externalState->setAuthorizationManager(authzManager.get()); - authzManager->setAuthEnabled(true); - } - - std::unique_ptr authzManager; - AuthzManagerExternalStateMockWithExplicitUserPrivileges* externalState; -}; - // Tests SERVER-21535, unrecognized actions should be ignored rather than causing errors. TEST_F(AuthorizationManagerTest, testAcquireV2UserWithUnrecognizedActions) { -- cgit v1.2.1