tests

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 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 SetGlogV

func SetGlogV(level int)

SetGlogV sets the logging flags when unit tests are run

Types

This section is empty.

Jump to

Keyboard shortcuts

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