diff --git a/internal/model/context_test.go b/internal/model/context_test.go index 733805a7..79bc97b0 100644 --- a/internal/model/context_test.go +++ b/internal/model/context_test.go @@ -238,7 +238,7 @@ func TestContext(t *testing.T) { _, err := c.NewFromGin(newGinCtx(nil, false)) return err.Error() }, - expected: "failed to get user context", + expected: model.ErrUserContextNotFound.Error(), }, { description: "NewFromGin returns error when context value has wrong type", diff --git a/internal/service/kubernetes_service_test.go b/internal/service/kubernetes_service_test.go index c7b39ead..702fe0f8 100644 --- a/internal/service/kubernetes_service_test.go +++ b/internal/service/kubernetes_service_test.go @@ -8,9 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tinyauthapp/tinyauth/internal/model" + "github.com/tinyauthapp/tinyauth/internal/utils/logger" ) func TestKubernetesService(t *testing.T) { + log := logger.NewLogger().WithTestConfig() + log.Init() + type testCase struct { description string run func(t *testing.T, svc *KubernetesService) @@ -179,6 +183,7 @@ func TestKubernetesService(t *testing.T) { ingressApps: make(map[ingressKey][]ingressApp), domainIndex: make(map[string]ingressAppKey), appNameIndex: make(map[string]ingressAppKey), + log: log, } test.run(t, svc) })