grpc icon indicating copy to clipboard operation
grpc copied to clipboard

Dedicated API for testing interceptors

Open v0idpwn opened this issue 5 months ago • 1 comments
trafficstars

Is your feature request related to a problem? Please describe. Currently, there's no way to test server interceptors without defining an endpoint and servers. Applications willing to test interceptors in isolation must define this boilerplate.

Describe the solution you'd like Something like Plug.Test, where I can get a stream and a request and apply interceptors.

Describe alternatives you've considered Stay without dedicated testing API, but document how one can test servers/interceptors and maybe reduce the necessary boilerplate (e.g.: if the library included a test service, you wouldn't need to define a test service in your application)

v0idpwn avatar Jun 05 '25 13:06 v0idpwn

Perhaps a GRPC.Testing module can be provided, and there might be a way for it to help define said testing modules more easily.

+1 for exploring this route (no pun intended)

polvalente avatar Jun 05 '25 13:06 polvalente

@v0idpwn @polvalente Can we explore this further? What would we expect to inject into the test module?

sleipnir avatar Jul 12 '25 15:07 sleipnir