Documentation
¶
Index ¶
- func AssertIdempotent(t *testing.T, fn func(*testing.T))
- func AssertIdempotentSubtest(t *testing.T, fn func(*testing.T)) func(*testing.T)
- func BoltDB(t *testing.T) *bbolt.DB
- func Copy(t testing.TB, src, dst string)
- func CreateInMemoryListeners(addresses []string) (map[string]*bufconn.Listener, grpc.DialOption)
- func Duration(d string) time.Duration
- func Time(t string) time.Time
- func ULID(t string) string
- func UnixMilli(t string) int64
- type CapturedOutput
- type TestingLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertIdempotent ¶ added in v1.11.0
AssertIdempotent asserts that the test is valid when run multiple times.
func AssertIdempotentSubtest ¶ added in v1.11.0
func CreateInMemoryListeners ¶ added in v1.14.0
Create in-memory listeners at given addresses. Also returns gRPC dial option for a client to connect to the appropriate in-memory listener for a given address.
Types ¶
type CapturedOutput ¶
type CapturedOutput struct {
// contains filtered or unexported fields
}
func CaptureOutput ¶
func CaptureOutput(t *testing.T) *CapturedOutput
CaptureOutput replaces os.Stdout and os.Stderr with new pipes, that will write output to buffers. Buffers are accessible by calling Done on returned struct.
os.Stdout and os.Stderr must be reverted to previous values manually.
func (*CapturedOutput) Done ¶
func (co *CapturedOutput) Done() (stdout string, stderr string)
Done waits until all captured output has been written to buffers, and then returns the buffers.
type TestingLogger ¶ added in v1.13.0
type TestingLogger struct {
// contains filtered or unexported fields
}
func NewTestingLogger ¶ added in v1.2.0
func NewTestingLogger(t testing.TB) *TestingLogger
func (*TestingLogger) Log ¶ added in v1.13.0
func (l *TestingLogger) Log(keyvals ...interface{}) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.