diff --git a/internal/authorization/authorizer_test.go b/internal/authorization/authorizer_test.go index 38f787c02..a465c3fe6 100644 --- a/internal/authorization/authorizer_test.go +++ b/internal/authorization/authorizer_test.go @@ -5,11 +5,10 @@ import ( "net/url" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "github.com/authelia/authelia/internal/configuration/schema" - - "github.com/stretchr/testify/assert" ) type AuthorizerSuite struct { diff --git a/internal/handlers/handler_firstfactor_test.go b/internal/handlers/handler_firstfactor_test.go index 22e51a2bc..f52f01604 100644 --- a/internal/handlers/handler_firstfactor_test.go +++ b/internal/handlers/handler_firstfactor_test.go @@ -4,16 +4,15 @@ import ( "fmt" "testing" - "github.com/authelia/authelia/internal/authorization" - "github.com/authelia/authelia/internal/configuration/schema" - "github.com/authelia/authelia/internal/mocks" - "github.com/authelia/authelia/internal/models" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "github.com/authelia/authelia/internal/authentication" + "github.com/authelia/authelia/internal/authorization" + "github.com/authelia/authelia/internal/configuration/schema" + "github.com/authelia/authelia/internal/mocks" + "github.com/authelia/authelia/internal/models" ) type FirstFactorSuite struct { diff --git a/internal/handlers/handler_logout_test.go b/internal/handlers/handler_logout_test.go index cbd042194..2b7ee55ba 100644 --- a/internal/handlers/handler_logout_test.go +++ b/internal/handlers/handler_logout_test.go @@ -4,11 +4,10 @@ import ( "strings" "testing" - "github.com/authelia/authelia/internal/mocks" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/suite" + + "github.com/authelia/authelia/internal/mocks" ) type LogoutSuite struct { diff --git a/internal/handlers/handler_state_test.go b/internal/handlers/handler_state_test.go index 5552eeaae..d40398aba 100644 --- a/internal/handlers/handler_state_test.go +++ b/internal/handlers/handler_state_test.go @@ -4,12 +4,11 @@ import ( "encoding/json" "testing" - "github.com/authelia/authelia/internal/mocks" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "github.com/authelia/authelia/internal/authentication" + "github.com/authelia/authelia/internal/mocks" ) type StateGetSuite struct { diff --git a/internal/handlers/handler_user_info_test.go b/internal/handlers/handler_user_info_test.go index ced0f7fbd..2d3c20286 100644 --- a/internal/handlers/handler_user_info_test.go +++ b/internal/handlers/handler_user_info_test.go @@ -4,13 +4,13 @@ import ( "fmt" "testing" - "github.com/authelia/authelia/internal/mocks" - "github.com/authelia/authelia/internal/storage" - "github.com/golang/mock/gomock" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" + + "github.com/authelia/authelia/internal/mocks" + "github.com/authelia/authelia/internal/storage" ) type FetchSuite struct { diff --git a/internal/handlers/handler_verify_test.go b/internal/handlers/handler_verify_test.go index 89357a4ce..ccbea0010 100644 --- a/internal/handlers/handler_verify_test.go +++ b/internal/handlers/handler_verify_test.go @@ -7,8 +7,6 @@ import ( "testing" "time" - "github.com/authelia/authelia/internal/session" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -18,6 +16,7 @@ import ( "github.com/authelia/authelia/internal/authorization" "github.com/authelia/authelia/internal/configuration/schema" "github.com/authelia/authelia/internal/mocks" + "github.com/authelia/authelia/internal/session" ) // Test getOriginalURL diff --git a/internal/middlewares/authelia_context_test.go b/internal/middlewares/authelia_context_test.go index 425589874..dcbeedcf5 100644 --- a/internal/middlewares/authelia_context_test.go +++ b/internal/middlewares/authelia_context_test.go @@ -3,8 +3,6 @@ package middlewares_test import ( "testing" - "github.com/authelia/authelia/internal/session" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/valyala/fasthttp" @@ -12,6 +10,7 @@ import ( "github.com/authelia/authelia/internal/configuration/schema" "github.com/authelia/authelia/internal/middlewares" "github.com/authelia/authelia/internal/mocks" + "github.com/authelia/authelia/internal/session" ) func TestShouldCallNextWithAutheliaCtx(t *testing.T) { diff --git a/internal/mocks/mock_authelia_ctx.go b/internal/mocks/mock_authelia_ctx.go index 5d90bdd3c..484130286 100644 --- a/internal/mocks/mock_authelia_ctx.go +++ b/internal/mocks/mock_authelia_ctx.go @@ -6,21 +6,19 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/authelia/authelia/internal/regulation" - "github.com/authelia/authelia/internal/storage" - "github.com/golang/mock/gomock" "github.com/sirupsen/logrus" "github.com/sirupsen/logrus/hooks/test" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/valyala/fasthttp" "github.com/authelia/authelia/internal/authorization" "github.com/authelia/authelia/internal/configuration/schema" "github.com/authelia/authelia/internal/middlewares" + "github.com/authelia/authelia/internal/regulation" "github.com/authelia/authelia/internal/session" + "github.com/authelia/authelia/internal/storage" ) // MockAutheliaCtx a mock of AutheliaCtx.