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

Function testInvalidDefaultServiceConfig

clientconn_test.go:903–908  ·  view source on GitHub ↗
(t *testing.T, r *manual.Resolver, addr, sc string)

Source from the content-addressed store, hash-verified

901}
902
903func testInvalidDefaultServiceConfig(t *testing.T, r *manual.Resolver, addr, sc string) {
904 _, err := NewClient(addr, WithTransportCredentials(insecure.NewCredentials()), WithResolvers(r), WithDefaultServiceConfig(sc))
905 if !strings.Contains(err.Error(), invalidDefaultServiceConfigErrPrefix) {
906 t.Fatalf("grpc.NewClient() got err: %v, want err contains: %v", err, invalidDefaultServiceConfigErrPrefix)
907 }
908}
909
910func testDefaultServiceConfigWhenResolverServiceConfigDisabled(t *testing.T, r *manual.Resolver, addr string, js string) {
911 cc, err := NewClient(addr, WithTransportCredentials(insecure.NewCredentials()), WithDisableServiceConfig(), WithResolvers(r), WithDefaultServiceConfig(js))

Callers

nothing calls this directly

Calls 7

NewCredentialsFunction · 0.92
WithTransportCredentialsFunction · 0.85
WithResolversFunction · 0.85
WithDefaultServiceConfigFunction · 0.85
NewClientFunction · 0.70
ErrorMethod · 0.65
FatalfMethod · 0.65

Tested by

no test coverage detected