test

package
v1.1.19 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHTTPResponse

func CreateHTTPResponse(respcode int, data ...string) *resty.Response

CreateHTTPResponse - helper to create an http response for test cases body parameters:

response code:
data[0] response body
data[1] http status
data[x*2 - 1] = http header where x > 1
data[x*2] = http header value

func HTTPSServer added in v1.1.17

func HTTPSServer(tlsConfig *tls.Config, code int, body string, headers map[string]string) (*httptest.Server, string)

HTTPSServer creates a TLS server with a provided response status code and body

func HTTPServer

func HTTPServer(code int, body string, headers map[string]string) (*httptest.Server, string)

HTTPServer creates a server with a provided response status code and body

func NewAssert

func NewAssert(t *testing.T) *assert.Assertions

NewAssert - calls `t.Parallel()` if tests were run with `GOMAXPROCS=4 go test -parallel=4 ./...`.

func NewRequire

func NewRequire(t *testing.T) *require.Assertions

NewRequire - calls `t.Parallel()` if tests were run with `GOMAXPROCS=4 go test -parallel=4 ./...`.

func NullLogger

func NullLogger() *logrus.Entry

NullLogger - create a logger that discards output.

func WithTimeout

func WithTimeout(t *testing.T, timeout time.Duration, test func(t *testing.T))

Types

This section is empty.

Jump to

Keyboard shortcuts

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