Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestServer ¶
func TestServer(t *testing.T, f MakeServer)
TestServer is a test suite for HTTP servers, inspired by golang.org/x/net/nettest.TestConn.
func TestTransport ¶
func TestTransport(t *testing.T, f MakeTransport)
TestTransport is a test suite for HTTP transports, inspired by golang.org/x/net/nettest.TestConn.
Types ¶
type MakeServer ¶
type MakeServer func(ServerConfig) (url string, close func())
MakeServer is a function called by the TestServer test suite to create a new HTTP server that runs the given config. The function must return the URL at which the server can be accessed and a closer function to terminate the server.
type MakeTransport ¶
type MakeTransport func() http.RoundTripper
MakeTransport constructs a new HTTP transport used by a single sub-test of TestTransport.
Click to show internal directories.
Click to hide internal directories.