From cd704661f296ea5252ce4ae0e21094ac2921b9c4 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Wed, 29 Nov 2023 16:16:27 +0100 Subject: [PATCH] graph unit test: Use mocked identity backend in utils_test This avoids running into the WaitForCA waitloop that is running in with the default (LDAP) identity backend when starting up in a clean environment. --- services/graph/pkg/service/v0/utils_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/graph/pkg/service/v0/utils_test.go b/services/graph/pkg/service/v0/utils_test.go index cff11c2bbf..1d1f60952c 100644 --- a/services/graph/pkg/service/v0/utils_test.go +++ b/services/graph/pkg/service/v0/utils_test.go @@ -5,13 +5,14 @@ import ( "net/http" "net/http/httptest" - provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" "github.com/go-chi/chi/v5" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" + provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" "github.com/cs3org/reva/v2/pkg/storagespace" "github.com/owncloud/ocis/v2/services/graph/pkg/config/defaults" + identitymocks "github.com/owncloud/ocis/v2/services/graph/pkg/identity/mocks" "github.com/owncloud/ocis/v2/ocis-pkg/shared" service "github.com/owncloud/ocis/v2/services/graph/pkg/service/v0" @@ -26,8 +27,10 @@ var _ = Describe("Utils", func() { cfg := defaults.FullDefaultConfig() cfg.GRPCClientTLS = &shared.GRPCClientTLS{} + identityBackend := &identitymocks.Backend{} svc, _ = service.NewService( service.Config(cfg), + service.WithIdentityBackend(identityBackend), ) })