test

package
v0.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Names = [...]string{}/* 237 elements not displayed */

	TLDs = [...]string{

		"com",

		"org",

		"net",

		"int",

		"edu",

		"gov",
	}

	Subdomains = [...]string{
		"www",
		"mail",
		"owa",
		"outlook",
		"git",
		"docs",
		"blog",
	}
)
View Source
var ErrListenerClosed = errors.New("listener closed")

Functions

func Context

func Context(t *testing.T) context.Context

func DNSResolverForInMemListener added in v0.6.0

func DNSResolverForInMemListener(lis InMemListener) *client.Resolver

func GenerateDomain added in v0.6.0

func GenerateDomain() string

func GenericMatcher added in v0.6.0

func GenericMatcher(tb testing.TB, expected interface{}) gomock.Matcher

func HTTP2ClientForInMemListener added in v0.7.0

func HTTP2ClientForInMemListener(lis InMemListener) *http.Client

func HTTPClientForAddr added in v0.9.0

func HTTPClientForAddr(tb testing.TB, addr net.Addr) *http.Client

func HTTPClientForInMemListener added in v0.6.0

func HTTPClientForInMemListener(lis InMemListener) *http.Client

func HTTPClientForListener added in v0.6.0

func HTTPClientForListener(tb testing.TB, lis net.Listener) *http.Client

func IP added in v0.8.0

func IP(rawIP string) td.TestDeep

func MustParseURL added in v0.7.0

func MustParseURL(rawURL string) *url.URL

func NewInMemoryPacketConnPipe added in v0.8.0

func NewInMemoryPacketConnPipe(clientAddr, srvAddr net.Addr) (upstream, downstream net.PacketConn)

func NewTCPListener added in v0.7.3

func NewTCPListener(tb testing.TB, rawAddr string) (listener net.Listener)

Types

type InMemListener added in v0.6.0

type InMemListener interface {
	net.Listener
	Dial(network, addr string) (net.Conn, error)
	DialContext(ctx context.Context, network, addr string) (net.Conn, error)
}

func NewInMemoryListener added in v0.6.0

func NewInMemoryListener(tb testing.TB) InMemListener

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL