MCPcopy
hub / github.com/grpc/grpc-go / callAndVerify

Function callAndVerify

security/advancedtls/advancedtls_integration_test.go:89–95  ·  security/advancedtls/advancedtls_integration_test.go::callAndVerify

TODO(ZhenLian): remove shouldFail to the function signature to provider tests.

(ctx context.Context, msg string, client pb.GreeterClient, shouldFail bool)

Source from the content-addressed store, hash-verified

87// TODO(ZhenLian): remove shouldFail to the function signature to provider
88// tests.
89func callAndVerify(ctx context.Context, msg string, client pb.GreeterClient, shouldFail bool) error {
90 _, err := client.SayHello(ctx, &pb.HelloRequest{Name: msg})
91 if want, got := shouldFail == true, err != nil; got != want {
92 return fmt.Errorf("want and got mismatch, want shouldFail=%v, got fail=%v, rpc error: %v", want, got, err)
93 }
94 return nil
95}
96
97// TODO(ZhenLian): remove shouldFail and add ...DialOption to the function
98// signature to provider cleaner tests.

Callers 3

TestEnd2EndMethod · 0.85

Calls 2

SayHelloMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected