Documentation ¶
Overview ¶
Package test contains function and types useful for writing tests
Index ¶
- func CoreDNSServer(corefile string) (*caddy.Instance, error)
- func CoreDNSServerAndPorts(corefile string) (i *caddy.Instance, udp, tcp string, err error)
- func CoreDNSServerPorts(i *caddy.Instance, k int) (udp, tcp string)
- func CoreDNSServerStop(i *caddy.Instance)
- func TempFile(dir, content string) (string, func(), error)
- type Input
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CoreDNSServer ¶
CoreDNSServer returns a CoreDNS test server. It just takes a normal Corefile as input.
func CoreDNSServerAndPorts ¶
CoreDNSServerAndPorts combines CoreDNSServer and CoreDNSServerPorts to start a CoreDNS server and returns the udp and tcp ports of the first instance.
func CoreDNSServerPorts ¶
CoreDNSServerPorts returns the ports the instance is listening on. The integer k indicates which ServerListener you want.
func CoreDNSServerStop ¶
CoreDNSServerStop stops a server.
Types ¶
type Input ¶
type Input struct {
// contains filtered or unexported fields
}
Input implements the caddy.Input interface and acts as an easy way to use a string as a Corefile.
func (*Input) ServerType ¶
ServerType implements the Input interface.
Click to show internal directories.
Click to hide internal directories.