Documentation ¶
Index ¶
- func CreateHTTPResponse(respcode int, data ...string) *resty.Response
- func HTTPSServer(tlsConfig *tls.Config, code int, body string, headers map[string]string) (*httptest.Server, string)
- 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 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 ¶
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.