yarpctest

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ZeroAddrStringToHostPort added in v1.15.0

func ZeroAddrStringToHostPort(addrString string) string

ZeroAddrStringToHostPort converts a string from net.Addr.String() created with net.Listen("tcp", ":0") to a hostPort string valid to use for Golang versions <= 1.8

See the "net" section in https://golang.org/doc/go1.9#minor_library_changes for more details.

func ZeroAddrStringToPort added in v1.15.0

func ZeroAddrStringToPort(addrString string) string

ZeroAddrStringToPort converts a string from net.Addr.String() created with net.Listen("tcp", ":0") to a port string valid to use for Golang versions <= 1.8

See the "net" section in https://golang.org/doc/go1.9#minor_library_changes for more details.

func ZeroAddrToHostPort added in v1.15.0

func ZeroAddrToHostPort(addr net.Addr) string

ZeroAddrToHostPort converts a net.Addr created with net.Listen("tcp", ":0") to a hostPort string valid to use for Golang versions <= 1.8

See the "net" section in https://golang.org/doc/go1.9#minor_library_changes for more details.

func ZeroAddrToPort added in v1.15.0

func ZeroAddrToPort(addr net.Addr) string

ZeroAddrToPort converts a net.Addr created with net.Listen("tcp", ":0") to a port string valid to use for Golang versions <= 1.8

See the "net" section in https://golang.org/doc/go1.9#minor_library_changes for more details.

Types

type FakeTestResult

type FakeTestResult struct {
	Errors []string
	Status FakeTestStatus
	Panic  interface{} // non-nil if we panicked
}

FakeTestResult contains the result of using a fake TestingT.

func WithFakeTestingT

func WithFakeTestingT(f func(require.TestingT)) *FakeTestResult

WithFakeTestingT yields a TestingT that records its results and exposes them in FakeTestResult.

type FakeTestStatus

type FakeTestStatus int

FakeTestStatus states how a fake TestingT finished.

const (
	// Finished is the default. This indicates that it was run to completion
	// but may have recorded errors using Errorf.
	Finished FakeTestStatus = iota

	// Fatal indicates that the TestingT aborted early with a FailNow.
	Fatal

	// Panicked indicates that the TestingT aborted with a panic.
	Panicked
)

func (FakeTestStatus) String

func (f FakeTestStatus) String() string

Jump to

Keyboard shortcuts

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