test

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPClient

func NewHTTPClient() *http.Client

NewHTTPClient creates a new <http.Client> object.

func NewLogger

func NewLogger() (*logrus.Logger, *logrustest.Hook)

func NewRemainContext

func NewRemainContext(name, value string) hcl.Body

func NumGoroutines added in v1.10.0

func NumGoroutines(filter string) (numRoutine int)

func WaitForClosedPort

func WaitForClosedPort(port int)

func WaitForOpenPort

func WaitForOpenPort(port int)

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

func NewBackend

func NewBackend() *Backend

func NewExpiredBackend added in v1.9.0

func NewExpiredBackend() (*Backend, *server.SelfSignedCertificate)

func (*Backend) Addr

func (b *Backend) Addr() string

func (*Backend) Close

func (b *Backend) Close()

func (*Backend) ServeHTTP

func (b *Backend) ServeHTTP(rw http.ResponseWriter, req *http.Request)
type Header map[string]string

func (Header) Set

func (h Header) Set(req *http.Request) Header

type Helper

type Helper struct {
	// contains filtered or unexported fields
}

func New

func New(tb testing.TB) *Helper

func (*Helper) Logf

func (h *Helper) Logf(msg string, args ...interface{})

func (*Helper) Must

func (h *Helper) Must(err error)

func (*Helper) NewInlineContext

func (h *Helper) NewInlineContext(inlineHCL string) hcl.Body

func (*Helper) NewOpenAPIConf

func (h *Helper) NewOpenAPIConf(path string) []byte

func (*Helper) TestFailed

func (h *Helper) TestFailed() bool

Jump to

Keyboard shortcuts

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