test

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 29 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 NewHTTPSClient added in v1.11.0

func NewHTTPSClient(tlsConf *tls.Config) *http.Client

func NewLogger

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

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) *hclsyntax.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