From aebcb38f904c965b8a059f613a88936889eafabf Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Fri, 1 May 2020 16:56:42 +1000 Subject: [PATCH] [MISC] Fix goimports ordering for repo (#947) --- internal/authorization/authorizer_test.go | 3 +-- internal/handlers/handler_firstfactor_test.go | 9 ++++----- internal/handlers/handler_logout_test.go | 5 ++--- internal/handlers/handler_state_test.go | 3 +-- internal/handlers/handler_user_info_test.go | 6 +++--- internal/handlers/handler_verify_test.go | 3 +-- internal/middlewares/authelia_context_test.go | 3 +-- internal/mocks/mock_authelia_ctx.go | 10 ++++------ 8 files changed, 17 insertions(+), 25 deletions(-) diff --git a/internal/authorization/authorizer_test.go b/internal/authorization/authorizer_test.go index 38f787c0..a465c3fe 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 22e51a2b..f52f0160 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 cbd04219..2b7ee55b 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 5552eeaa..d40398ab 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 ced0f7fb..2d3c2028 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 89357a4c..ccbea001 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 42558987..dcbeedcf 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 5d90bdd3..48413028 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.