From 0718c89203df192e797ca38271073770a3cd4312 Mon Sep 17 00:00:00 2001 From: Marco Ebert Date: Sat, 15 Jun 2024 10:05:28 +0200 Subject: [PATCH] Tests: Replace deprecated `grpc.Dial` by `grpc.NewClient`. (#11462) --- test/e2e/annotations/grpc.go | 10 +++++----- test/e2e/settings/grpc.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/e2e/annotations/grpc.go b/test/e2e/annotations/grpc.go index 60696e139..530d16729 100644 --- a/test/e2e/annotations/grpc.go +++ b/test/e2e/annotations/grpc.go @@ -107,7 +107,7 @@ var _ = framework.DescribeAnnotation("backend-protocol - GRPC", func() { }) //nolint:goconst //string interpolation - conn, err := grpc.Dial(f.GetNginxIP()+":443", + conn, err := grpc.NewClient(f.GetNginxIP()+":443", grpc.WithTransportCredentials( credentials.NewTLS(&tls.Config{ ServerName: echoHost, @@ -168,7 +168,7 @@ var _ = framework.DescribeAnnotation("backend-protocol - GRPC", func() { return strings.Contains(server, "grpc_pass grpc://upstream_balancer;") }) - conn, err := grpc.Dial(f.GetNginxIP()+":443", + conn, err := grpc.NewClient(f.GetNginxIP()+":443", grpc.WithTransportCredentials( credentials.NewTLS(&tls.Config{ ServerName: echoHost, @@ -242,7 +242,7 @@ var _ = framework.DescribeAnnotation("backend-protocol - GRPC", func() { return strings.Contains(server, "grpc_pass grpcs://upstream_balancer;") }) - conn, err := grpc.Dial(f.GetNginxIP()+":443", + conn, err := grpc.NewClient(f.GetNginxIP()+":443", grpc.WithTransportCredentials( credentials.NewTLS(&tls.Config{ ServerName: echoHost, @@ -286,7 +286,7 @@ var _ = framework.DescribeAnnotation("backend-protocol - GRPC", func() { strings.Contains(server, fmt.Sprintf("grpc_read_timeout %ss;", proxyTimeout)) }) - conn, err := grpc.Dial( + conn, err := grpc.NewClient( f.GetNginxIP()+":80", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithAuthority(host), @@ -329,7 +329,7 @@ var _ = framework.DescribeAnnotation("backend-protocol - GRPC", func() { strings.Contains(server, fmt.Sprintf("grpc_read_timeout %ss;", proxyTimeout)) }) - conn, err := grpc.Dial( + conn, err := grpc.NewClient( f.GetNginxIP()+":80", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithAuthority(host), diff --git a/test/e2e/settings/grpc.go b/test/e2e/settings/grpc.go index fa5f35b24..ae3175034 100644 --- a/test/e2e/settings/grpc.go +++ b/test/e2e/settings/grpc.go @@ -86,7 +86,7 @@ var _ = framework.DescribeSetting("GRPC", func() { return strings.Contains(server, "grpc_pass grpc://upstream_balancer;") }) - conn, err := grpc.Dial(f.GetNginxIP()+":443", + conn, err := grpc.NewClient(f.GetNginxIP()+":443", grpc.WithTransportCredentials( credentials.NewTLS(&tls.Config{ ServerName: echoHost,