Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45161

AuthorizationManagerWithExplicitUserPrivilegesTest is never used

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: Security
    • Fully Compatible
    • Security 2021-06-14

      The AuthorizationManagerWithExplicitUserPrivilegesTest fixture is present in db/auth/authorization_manager_test.cpp along with the AuthzManagerExternalStateMockWithExplicitUserPrivileges helper, but neither are actually used anywhere in the codebase.

      $ rg AuthorizationManagerWithExplicitUserPrivilegesTest
      src/mongo/db/auth/authorization_manager_test.cpp
      264:class AuthorizationManagerWithExplicitUserPrivilegesTest : public ::mongo::unittest::Test {
      $ rg AuthzManagerExternalStateMockWithExplicitUserPrivileges
      src/mongo/db/auth/authorization_manager_test.cpp
      232:class AuthzManagerExternalStateMockWithExplicitUserPrivileges
      268:            std::make_unique<AuthzManagerExternalStateMockWithExplicitUserPrivileges>();
      279:    AuthzManagerExternalStateMockWithExplicitUserPrivileges* externalState;
      

      Is this intentional? If so, then they should be removed. If not, then they should be used by appropriate unittests.

            Assignee:
            aldo.aguilar@mongodb.com Aldo Aguilar
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: