Tests: Replace deprecated grpc.Dial by grpc.NewClient. (#11468)

This commit is contained in:
Marco Ebert 2024-06-15 12:07:27 +02:00 committed by GitHub
parent d6dad98091
commit c36c8dee26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -104,7 +104,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,
@ -165,7 +165,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,
@ -239,7 +239,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,