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
path: root/auth
diff options
context:
space:
mode:
authorEric Ju <eju@gitlab.com>2023-11-01 05:18:54 +0300
committerEric Ju <eju@gitlab.com>2023-11-07 18:34:17 +0300
commit1a96b11d819f7b0bff63a4c3fd3f2588b40edc90 (patch)
tree63efe9ed84b686cc5283db53ac08e270b9974bd0 /auth
parent3be7e32d019774d74523dc8cc8c0b6519cf76af5 (diff)
go: Update "metadata" util to go-grpc-middleware v2
Currenlty, github.com/grpc-ecosystem/go-grpc-middleware v1 is used in our code base. This commit replace "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils" with go-grpc-middleware v2 metadata
Diffstat (limited to 'auth')
-rw-r--r--auth/extract_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/auth/extract_test.go b/auth/extract_test.go
index cb13e2ff2..982541b07 100644
--- a/auth/extract_test.go
+++ b/auth/extract_test.go
@@ -4,7 +4,7 @@ import (
"testing"
"time"
- "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils"
+ "github.com/grpc-ecosystem/go-grpc-middleware/v2/metadata"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly/v16/internal/testhelper"
)
@@ -79,7 +79,7 @@ func TestCheckTokenV2(t *testing.T) {
t.Run(tc.desc, func(t *testing.T) {
ctx := testhelper.Context(t)
- md := metautils.NiceMD{}
+ md := metadata.MD{}
md.Set("authorization", "Bearer "+tc.token)
result := CheckToken(md.ToIncoming(ctx), string(secret), targetTime)