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)