Documentation ¶
Index ¶
- func CreateHTTPResponse(respcode int, data ...string) *resty.Response
- func HTTPServer(code int, body string, headers map[string]string) (*httptest.Server, string)
- func NewAssert(t *testing.T) *assert.Assertions
- func NewRequire(t *testing.T) *require.Assertions
- func NullLogger() *logrus.Entry
- func WithTimeout(t *testing.T, timeout time.Duration, test func(t *testing.T))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateHTTPResponse ¶
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 ¶
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 ¶
NullLogger - create a logger that discards output.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.