Skip to content

Commit c4a4b0c

Browse files
committed
fix linter issues
1 parent 2012f9c commit c4a4b0c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

connection_e2e_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import (
77
"context"
88
"crypto/tls"
99
"fmt"
10-
grpcCredentials "google.golang.org/grpc/credentials"
11-
"google.golang.org/grpc/credentials/insecure"
1210
"net/url"
1311
"os"
1412
"testing"
@@ -25,6 +23,8 @@ import (
2523
"github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Operations"
2624
"github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Scripting"
2725
"google.golang.org/grpc"
26+
grpcCredentials "google.golang.org/grpc/credentials"
27+
"google.golang.org/grpc/credentials/insecure"
2828
"google.golang.org/grpc/metadata"
2929
"google.golang.org/protobuf/proto"
3030
"google.golang.org/protobuf/types/known/durationpb"
@@ -339,9 +339,11 @@ func TestStaticCredentials(t *testing.T) {
339339

340340
staticCredentials := credentials.NewStaticCredentials("root", "", url.Host, func() grpc.DialOption {
341341
if url.Scheme == "grpcs" {
342-
transportCredentials, err := grpcCredentials.NewClientTLSFromFile(os.Getenv("YDB_SSL_ROOT_CERTIFICATES_FILE"), "")
342+
transportCredentials, transportCredentialsErr := grpcCredentials.NewClientTLSFromFile(
343+
os.Getenv("YDB_SSL_ROOT_CERTIFICATES_FILE"), url.Hostname(),
344+
)
343345
if err != nil {
344-
t.Fatalf("cannot create transport credentials: %v", err)
346+
t.Fatalf("cannot create transport credentials: %v", transportCredentialsErr)
345347
}
346348
return grpc.WithTransportCredentials(transportCredentials)
347349
}

0 commit comments

Comments
 (0)