diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2018-05-11 12:59:17 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2018-05-11 12:59:17 -0400 |
commit | ecf8ad987548705e773d23d5ddc3973cbc1ea7e5 (patch) | |
tree | 62164575b6303aebecbe41670c74b713cfa314c7 /src/mongo/db/logical_session_cache_test.cpp | |
parent | 56cbcf28c6bd4d9f9e739fb834d83b61c99516f1 (diff) | |
download | mongo-ecf8ad987548705e773d23d5ddc3973cbc1ea7e5.tar.gz |
SERVER-33008 Slice Authorization framework
The Authorization framework was intertwined with many subsystems and
needed to be properly abstracted in order to facilitate cutting down
on certain unnecessary dependencies in some libraries. This also
facilitates creating a reduced authorization framework for use
in embedded builds.
Diffstat (limited to 'src/mongo/db/logical_session_cache_test.cpp')
-rw-r--r-- | src/mongo/db/logical_session_cache_test.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mongo/db/logical_session_cache_test.cpp b/src/mongo/db/logical_session_cache_test.cpp index 3d1b625aff1..10dcc9d8e4a 100644 --- a/src/mongo/db/logical_session_cache_test.cpp +++ b/src/mongo/db/logical_session_cache_test.cpp @@ -28,15 +28,15 @@ #include "mongo/platform/basic.h" +#include "mongo/db/logical_session_cache_impl.h" + +#include "mongo/bson/oid.h" #include "mongo/db/auth/authorization_manager.h" #include "mongo/db/auth/authorization_session_for_test.h" #include "mongo/db/auth/authz_manager_external_state_mock.h" #include "mongo/db/auth/authz_session_external_state_mock.h" - -#include "mongo/bson/oid.h" #include "mongo/db/auth/user_name.h" #include "mongo/db/logical_session_cache.h" -#include "mongo/db/logical_session_cache_impl.h" #include "mongo/db/logical_session_id.h" #include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context_noop.h" @@ -69,11 +69,7 @@ public: _sessions(std::make_shared<MockSessionsCollectionImpl>()) {} void setUp() override { - auto localManagerState = stdx::make_unique<AuthzManagerExternalStateMock>(); - localManagerState.get()->setAuthzVersion(AuthorizationManager::schemaVersion28SCRAM); - auto uniqueAuthzManager = - stdx::make_unique<AuthorizationManager>(std::move(localManagerState)); - AuthorizationManager::set(&serviceContext, std::move(uniqueAuthzManager)); + AuthorizationManager::set(&serviceContext, AuthorizationManager::create()); auto client = serviceContext.makeClient("testClient"); _opCtx = client->makeOperationContext(); |