Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/praefect/helper_test.go')
-rw-r--r--internal/praefect/helper_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/praefect/helper_test.go b/internal/praefect/helper_test.go
index b9ee12476..95949b5a6 100644
--- a/internal/praefect/helper_test.go
+++ b/internal/praefect/helper_test.go
@@ -7,7 +7,6 @@ import (
"testing"
"time"
- "github.com/golang/protobuf/proto"
"github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/require"
@@ -28,6 +27,8 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/health"
healthpb "google.golang.org/grpc/health/grpc_health_v1"
+ "google.golang.org/protobuf/reflect/protodesc"
+ protoreg "google.golang.org/protobuf/reflect/protoregistry"
)
// generates a praefect configuration with the specified number of backend
@@ -222,9 +223,9 @@ func runPraefectServer(t testing.TB, conf config.Config, opt buildOptions) (*grp
}
func mustLoadProtoReg(t testing.TB) *descriptor.FileDescriptorProto {
- fd, err := protoregistry.ExtractFileDescriptor(proto.FileDescriptor("praefect/mock/mock.proto"))
+ fd, err := protoreg.GlobalFiles.FindFileByPath("praefect/mock/mock.proto")
require.NoError(t, err)
- return fd
+ return protodesc.ToFileDescriptorProto(fd)
}
func listenAvailPort(tb testing.TB) (net.Listener, int) {