From 61598cf8c8a2dbae368f3f8b15393c70d2e4fa9d Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 7 May 2025 09:37:04 -0700 Subject: refactor: move test server to oidc package --- app/controllers/dashboard/controller_test.go | 2 +- app/controllers/sessions/controller_test.go | 4 ++-- app/controllers/sessions/service_test.go | 4 ++-- app/controllers/sparkles/controller_test.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/dashboard/controller_test.go b/app/controllers/dashboard/controller_test.go index 30a9acc..c717a74 100644 --- a/app/controllers/dashboard/controller_test.go +++ b/app/controllers/dashboard/controller_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/xlgmokha/x/pkg/test" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/cfg" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/domain" - "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/test" ) func TestController(t *testing.T) { diff --git a/app/controllers/sessions/controller_test.go b/app/controllers/sessions/controller_test.go index c86f2f8..a29041e 100644 --- a/app/controllers/sessions/controller_test.go +++ b/app/controllers/sessions/controller_test.go @@ -11,17 +11,17 @@ import ( "github.com/oauth2-proxy/mockoidc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/xlgmokha/x/pkg/test" "github.com/xlgmokha/x/pkg/x" xcfg "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/cfg" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/domain" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/oidc" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/pls" - "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/test" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/web" ) func TestSessions(t *testing.T) { - srv := test.NewOIDCServer(t) + srv := oidc.NewTestServer(t) defer srv.Close() clientID := srv.MockOIDC.Config().ClientID diff --git a/app/controllers/sessions/service_test.go b/app/controllers/sessions/service_test.go index e5e08fa..81248ca 100644 --- a/app/controllers/sessions/service_test.go +++ b/app/controllers/sessions/service_test.go @@ -7,14 +7,14 @@ import ( "github.com/oauth2-proxy/mockoidc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/xlgmokha/x/pkg/test" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/oidc" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/pls" - "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/test" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/web" ) func TestService(t *testing.T) { - srv := test.NewOIDCServer(t) + srv := oidc.NewTestServer(t) defer srv.Close() clientID := srv.MockOIDC.Config().ClientID diff --git a/app/controllers/sparkles/controller_test.go b/app/controllers/sparkles/controller_test.go index c158f32..b2c7752 100644 --- a/app/controllers/sparkles/controller_test.go +++ b/app/controllers/sparkles/controller_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/xlgmokha/x/pkg/serde" + "github.com/xlgmokha/x/pkg/test" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/cfg" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/db" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/domain" - "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/test" ) func TestSparkles(t *testing.T) { -- cgit v1.2.3