Skip to content

Commit

Permalink
fix(cluster): Fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
hueypark committed Dec 13, 2022
1 parent ab69c60 commit 0d8bb70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/status"
)

Expand Down Expand Up @@ -79,7 +80,7 @@ func OpenRemote(clusterState coordinator.Coordinator, opt Options) (Cluster, err
grpcOpts = append(grpcOpts, grpc.WithTransportCredentials(cert))
} else {
// log.Warn("inter-node RPC is in insecure mode. we recommend configuring TLS credentials.")
grpcOpts = append(grpcOpts, grpc.WithInsecure())
grpcOpts = append(grpcOpts, grpc.WithTransportCredentials(insecure.NewCredentials()))
}

ctx, cancel := context.WithCancel(context.Background())
Expand Down
4 changes: 3 additions & 1 deletion cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"golang.org/x/net/nettest"
"google.golang.org/grpc"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/credentials/insecure"
)

const (
Expand Down Expand Up @@ -194,7 +195,8 @@ func WithTestNodes(t *testing.T, cluster cluster.Cluster, fn func(nodes []node.R
}(i)

// Wait until the grpc server starts
conn, err := grpc.Dial(lis.Addr().String(), grpc.WithInsecure(), grpc.WithBlock())
conn, err := grpc.Dial(
lis.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock())
require.Nil(t, err)
conn.Close()

Expand Down

0 comments on commit 0d8bb70

Please sign in to comment.