From f5c5faee4d852dc9a440e50595f20828b5298d41 Mon Sep 17 00:00:00 2001 From: yihuaz Date: Fri, 30 Oct 2020 16:12:29 -0700 Subject: [PATCH] fix vet error --- test/insecure_creds_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/insecure_creds_test.go b/test/insecure_creds_test.go index 61aaf68bbae4..31f8f5def03a 100644 --- a/test/insecure_creds_test.go +++ b/test/insecure_creds_test.go @@ -48,10 +48,6 @@ func (cr testLegacyPerRPCCredentials) RequireTransportSecurity() bool { return true } -func isExpectedError(got, want error) bool { - return status.Code(got) == status.Code(want) && strings.Contains(status.Convert(got).Message(), status.Convert(want).Message()) -} - // TestInsecureCreds tests the use of insecure creds on the server and client // side, and verifies that expect security level and auth info are returned. // Also verifies that this credential can interop with existing `WithInsecure` @@ -197,6 +193,9 @@ func (s) TestInsecureCredsWithPerRPCCredentials(t *testing.T) { if test.perRPCCredsViaCallOptions { cc, err := grpc.DialContext(ctx, addr, cOpts...) + if err != nil { + t.Fatalf("grpc.Dial(%q) failed: %v", addr, err) + } defer cc.Close() c := testpb.NewTestServiceClient(cc)