diff options
Diffstat (limited to 'internal/gitaly/service/repository/testhelper_test.go')
-rw-r--r-- | internal/gitaly/service/repository/testhelper_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/gitaly/service/repository/testhelper_test.go b/internal/gitaly/service/repository/testhelper_test.go index 9095225ff..6b91fe479 100644 --- a/internal/gitaly/service/repository/testhelper_test.go +++ b/internal/gitaly/service/repository/testhelper_test.go @@ -96,7 +96,7 @@ func newSecureRepoClient(t *testing.T, serverSocketPath string, pool *x509.CertP var NewSecureRepoClient = newSecureRepoClient -func runRepoServerWithConfig(t *testing.T, cfg config.Cfg, locator storage.Locator, opts ...testhelper.TestServerOpt) (string, func()) { +func buildTestingServer(t *testing.T, cfg config.Cfg, locator storage.Locator, opts ...testhelper.TestServerOpt) *testhelper.TestServer { streamInt := []grpc.StreamServerInterceptor{ mcache.StreamInvalidator(dcache.LeaseKeyer{}, protoregistry.GitalyProtoPreregistered), } @@ -109,6 +109,11 @@ func runRepoServerWithConfig(t *testing.T, cfg config.Cfg, locator storage.Locat gitalypb.RegisterRepositoryServiceServer(srv.GrpcServer(), NewServer(cfg, RubyServer, locator, config.Config.GitalyInternalSocketPath())) reflection.Register(srv.GrpcServer()) + return srv +} + +func runRepoServerWithConfig(t *testing.T, cfg config.Cfg, locator storage.Locator, opts ...testhelper.TestServerOpt) (string, func()) { + srv := buildTestingServer(t, cfg, locator, opts...) require.NoError(t, srv.Start()) return "unix://" + srv.Socket(), srv.Stop |