test

package
v0.0.0-...-c1e363b Latest Latest
Warning

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

Go to latest
Published: May 9, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyLogEntryContainsField

func AnyLogEntryContainsField(tb testing.TB, key string, expectedValue interface{}, logEntries []*logrus.Entry)

AnyLogEntryContainsField fails if no log entry is found to contain a field with the given key.

func AnyLogEntryContainsMessage

func AnyLogEntryContainsMessage(tb testing.TB, expectedValue string, logEntries []*logrus.Entry)

AnyLogEntryContainsMessage fails if the log entries message does not match the expected value.

func Assert

func Assert(tb testing.TB, condition bool, v ...interface{})

Assert fails the test if the condition is false.

func Equals

func Equals(tb testing.TB, expected, actual interface{})

Equals fails the test if expected is not equal to actual.

func ErrorNil

func ErrorNil(tb testing.TB, err error)

ErrorNil fails the test if an err is not nil.

func ErrorNotNil

func ErrorNotNil(tb testing.TB, err error)

ErrorNotNil fails the test if an err is not nil.

func LogEntryContainsField

func LogEntryContainsField(tb testing.TB, key string, expectedValue string, logEntry *logrus.Entry)

LogEntryContainsField fails if the log entry does not contain a field with the given key.

func MakeGetRequest

func MakeGetRequest(handler http.Handler, uri string) (resp *httptest.ResponseRecorder)

MakeGetRequest performs a GET request using a given handler.

Types

This section is empty.

Jump to

Keyboard shortcuts

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