Documentation ¶
Overview ¶
Package testutil contains helper functions for writing tests.
Patterned after google.golang.org/cloud/internal/testutil.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustTempDir ¶
func MustTempDir() (string, func())
MustTempDir returns a randomly generated temp dir from ioutil.TempDir and a cleanup function. Any encountered err results in a panic.
func NewTestLogger ¶
NewTestLogger returns a logger that logs to the returned buffer. Timestamps, caller, and stacktraces are disabled to make it easier to validate log output. Test coverage for timestamp, caller, and stacktrace output can be found in github.com/magma/magma/src/go/log/zap/zap_integ_test.go.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.