| 852 | } |
| 853 | |
| 854 | func (a *assertSchemaInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { |
| 855 | return func(ctx context.Context, req connect.AnyRequest) (connect.AnyResponse, error) { |
| 856 | if !assert.NotNil(a.tb, req.Spec().Schema) { |
| 857 | return next(ctx, req) |
| 858 | } |
| 859 | methodDesc, ok := req.Spec().Schema.(protoreflect.MethodDescriptor) |
| 860 | if assert.True(a.tb, ok) { |
| 861 | procedure := fmt.Sprintf("/%s/%s", methodDesc.Parent().FullName(), methodDesc.Name()) |
| 862 | assert.Equal(a.tb, procedure, req.Spec().Procedure) |
| 863 | } |
| 864 | return next(ctx, req) |
| 865 | } |
| 866 | } |
| 867 | |
| 868 | func (a *assertSchemaInterceptor) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc { |
| 869 | return func(ctx context.Context, spec connect.Spec) connect.StreamingClientConn { |