Documentation
¶
Overview ¶
Package fasttestutil is the fasthttp half of the backend-neutral test seam.
It declares Exchange with the name, the parameter order and the neutral request and response types testutil's has, so a test moves between the two by changing its import and nothing else — the same relationship pwfast has with pw, applied to the harness a test drives them through.
It is a package of its own rather than a file inside testutil because testutil is a shipped package that a net/http-only project imports, and putting the fasthttp fork behind that import would hand the fork to every such project.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exchange ¶
func Exchange(t pwtest.TestingT, handler fasthttp.RequestHandler, request pwtest.Request) pwtest.Response
Exchange runs one request through handler on a real fasthttp server and returns what it answered.
Real server, in-memory connection, the same as the other half: the request is parsed and the response serialized, so what is tested is what the transport does rather than what a hand-built request value was told to say.
Types ¶
This section is empty.