testing

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscardLogging

func DiscardLogging() (restore func())

DiscardLogging sets the global Logrus output to utils.Discard

func SetupLoggingBuffer

func SetupLoggingBuffer() (buf *bytes.Buffer, restore func())

SetupLoggingBuffer creates an empty buffer and sets it as a Logrus output globally. Returns the created buffer so you can check what was logged.

func ToJSONBytes

func ToJSONBytes(t *testing.T, obj interface{}) []byte

ToJSONBytes converts any structure to a byte slice of its JSON representation

Types

This section is empty.

Jump to

Keyboard shortcuts

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