tests

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResponseErrorMessage

func CheckResponseErrorMessage(t *testing.T, resp *http.Response, expectedMessage string)

CheckResponseErrorMessage reads and closes the response body payload (if any), and asserts that it matches the expectedMessage argument

func RandHighPort

func RandHighPort() (randPort int)

RandHighPort return a free port in the range[1024,65535)

func ReadBodyAndClose

func ReadBodyAndClose(bodyReader io.ReadCloser) ([]byte, error)

ReadBodyAndClose properly handles the reading of body and closing the reader

func SetKlogV added in v0.2.0

func SetKlogV(level int)

SetKlogV sets the logging flags when unit tests are run

func StrPtr added in v0.5.0

func StrPtr(s string) *string

StrPtr is a convenience one-liner for producing pointers to string values

Types

This section is empty.

Jump to

Keyboard shortcuts

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