From 359c3bc1d1d6eca56366abb8bf7236c08e4355f5 Mon Sep 17 00:00:00 2001 From: Tom Morelly Date: Sat, 6 Jul 2024 14:34:59 +1000 Subject: [PATCH] fix(grpc): use NewClient() instead of deprecated grpc.Dial() --- .goreleaser.yml | 2 +- pkg/plugin/plugin_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index ffc6771..f51bfde 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,7 +1,7 @@ builds: - env: - - CGO_ENABLED=0 + - CGO_ENABLED=0 binary: vault-kubernetes-kms goos: - linux diff --git a/pkg/plugin/plugin_test.go b/pkg/plugin/plugin_test.go index 3d73faa..cbb1c6a 100644 --- a/pkg/plugin/plugin_test.go +++ b/pkg/plugin/plugin_test.go @@ -35,7 +35,7 @@ func TestVaultSuite(t *testing.T) { } } -func (p *PluginSuite) SetupAllSuitr() { +func (p *PluginSuite) SetupAllSuite() { // create unix socket _, err := socket.NewSocket(socketPath) if err != nil { @@ -43,7 +43,7 @@ func (p *PluginSuite) SetupAllSuitr() { } // grpc connection with socket - conn, err := grpc.Dial( + conn, err := grpc.NewClient( socketPath, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) {