Documentation
¶
Index ¶
- Variables
- func EnableDebugForMethod() func()
- func EnableInfoForMethod() func()
- func ExpectDone(a *assert.Assertions, doneChannel chan bool)
- func ExpectPanic(t *testing.T)
- func NewMockBenchmarkCtrl(b *testing.B) (*gomock.Controller, func())
- func NewMockCtrl(t *testing.T) (*gomock.Controller, func())
- func PprofDebug()
- func ResetDefaultRegistryHealthCheck()
- func SkipIfDisabled(t *testing.T)
- func SkipIfShort(t *testing.T)
Constants ¶
This section is empty.
Variables ¶
var MockCtrl *gomock.Controller
MockCtrl is a gomock.Controller to use globally
Functions ¶
func EnableDebugForMethod ¶
func EnableDebugForMethod() func()
EnableDebugForMethod enables debug-level output through the current test Usage:
testutil.EnableDebugForMethod()()
func EnableInfoForMethod ¶
func EnableInfoForMethod() func()
EnableInfoForMethod enables info-level output through the current test Usage:
testutil.EnableInfoForMethod()()
func ExpectDone ¶
func ExpectDone(a *assert.Assertions, doneChannel chan bool)
ExpectDone waits to receive a value in the doneChannel for at least a second or fails the test.
func ExpectPanic ¶
ExpectPanic expects a panic (and fails if this does not happen).
func NewMockBenchmarkCtrl ¶
func NewMockBenchmarkCtrl(b *testing.B) (*gomock.Controller, func())
func NewMockCtrl ¶
func NewMockCtrl(t *testing.T) (*gomock.Controller, func())
NewMockCtrl initializes the `MockCtrl` package var and returns a method to finish the controller when test is complete **Important**: Don't forget to call the returned method at the end of the test Usage:
ctrl, finish := test_util.NewMockCtrl(t) defer finish()
func PprofDebug ¶
func PprofDebug()
func ResetDefaultRegistryHealthCheck ¶
func ResetDefaultRegistryHealthCheck()
ResetDefaultRegistryHealthCheck resets the existing registry containing health-checks
func SkipIfDisabled ¶
SkipIfDisabled skips a test if the GO_TEST_DISABLED environment variable is set to any value (when `go test` runs)
func SkipIfShort ¶
SkipIfShort skips a test if the `-short` flag is given to `go test`
Types ¶
This section is empty.