Documentation ¶
Overview ¶
Package integration provides an interface to write integration tests for the reverse proxy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance is a test instance of the reverse proxy corresponding to a config.
func NewInstance ¶
NewInstance creates a new instance of the reverse proxy with the given config.
func (*Instance) RequestHost ¶
RequestHost sends a request to the reverse proxy with the given host.
func (*Instance) RequestHostTLS ¶
RequestHostTLS sends a request to the reverse proxy with the given host, using TLS.
type MockServer ¶
type MockServer struct {
// contains filtered or unexported fields
}
MockServer is a test instance of a server.
func NewMockServer ¶
func NewMockServer(t *testing.T, handle http.HandlerFunc) *MockServer
NewMockServer creates a new test instance of a server. The server will be closed when the test function returns.
func (*MockServer) SplitHostPort ¶
func (s *MockServer) SplitHostPort() (host, port string)
SplitHostPort returns the host and port of the server. Will call t.Fatal if the URL is invalid.