test

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: May 16, 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 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