AuthorizationManagerWithExplicitUserPrivilegesTest is never used

XMLWordPrintableJSON

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

      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
            Reporter:
            Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: