forked from TrueCloudLab/certificates
Fix deprecation of grpc.WithInsecure option
With the update of go.step.sm/linkedca grpc.WithInsecure was deprecated. This commit fixes this by setting up the (insecure) connection using the new method.
This commit is contained in:
parent
3b72d241e0
commit
ad041d6bb7
1 changed files with 2 additions and 1 deletions
|
@ -31,6 +31,7 @@ import (
|
||||||
longrunningpb "google.golang.org/genproto/googleapis/longrunning"
|
longrunningpb "google.golang.org/genproto/googleapis/longrunning"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
"google.golang.org/grpc/test/bufconn"
|
"google.golang.org/grpc/test/bufconn"
|
||||||
"google.golang.org/protobuf/types/known/anypb"
|
"google.golang.org/protobuf/types/known/anypb"
|
||||||
|
@ -852,7 +853,7 @@ func TestCloudCAS_CreateCertificateAuthority(t *testing.T) {
|
||||||
defer srv.Stop()
|
defer srv.Stop()
|
||||||
|
|
||||||
// Create fake privateca client
|
// Create fake privateca client
|
||||||
conn, err := grpc.DialContext(context.Background(), "", grpc.WithInsecure(),
|
conn, err := grpc.DialContext(context.Background(), "", grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||||
grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) {
|
grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) {
|
||||||
return lis.Dial()
|
return lis.Dial()
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Add table
Reference in a new issue