Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NotFoundURL ¶
NotFoundURL returns the base URL of a local server that answers 404 to every request until the test ends. Use it for a resource that must point at an endpoint which fails at once and never leaves the machine: a public host can be slow or unreachable on a CI runner, and a closed local port takes seconds to refuse on Windows.
Types ¶
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
HTTP is a HTTP server that can be used in integration tests.
type Option ¶
type Option func(*options)
Option is a function that configures the process.
func WithHandler ¶
func WithHandlerFunc ¶ added in v1.13.0
func WithHandlerFunc(path string, fn http.HandlerFunc) Option
Click to show internal directories.
Click to hide internal directories.