Skip to content

Migrate tests to use AuthorizationMiddleware instead of checkAuthentication in internal/auth/auth_test.go

The following discussion from !1119 (merged) should be addressed:

Implementation guide:

  • @vshushlin started a discussion:

    thought (non-blocking/follow-up): Can we open a follow up to migrate all the tests to use middleware instead of the checkAuthentication method in internal/auth/auth_test.go?

    domain.Domain has some methods that are not part of its parent interface. Additionally, we are not returning a reference to the interface here. Therefore, we need to refactor the code to allow for expanding the existing domain mock, enabling testing of AuthorizationMiddleware.

Edited by Naman Jagdish Gala