Documentation ¶
Index ¶
- Constants
- func Assert(tb testing.TB, condition bool, msg string, v ...interface{})
- func DirHash(t *testing.T, path string) []byte
- func DirSize(t *testing.T, path string) int64
- func Equals(tb testing.TB, exp, act interface{}, msgAndArgs ...interface{})
- func NewLogger(t *testing.T) log.Logger
- func NotEquals(tb testing.TB, exp, act interface{})
- func NotOk(tb testing.TB, err error)
- func Ok(tb testing.TB, err error)
- type Closer
- type T
- type TemporaryDirectory
Constants ¶
View Source
const ( // NilCloser is a no-op Closer. NilCloser = nilCloser(true) )
Variables ¶
This section is empty.
Functions ¶
func DirHash ¶ added in v0.10.2
DirHash returns a hash of all files attribites and their content within a directory.
Types ¶
type Closer ¶
type Closer interface { // Close reaps the underlying directory and its children. The directory // could be deleted by its users already. Close() }
Closer is the interface that wraps the Close method.
func NewCallbackCloser ¶
func NewCallbackCloser(fn func()) Closer
NewCallbackCloser returns a Closer that calls the provided function upon closing.
type T ¶
type T interface { Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) }
T implements the needed methods of testing.TB so that we do not need to actually import testing (which has the side effect of adding all the test flags, which we do not want in non-test binaries even if they make use of these utilities for some reason).
type TemporaryDirectory ¶
type TemporaryDirectory interface { Closer // Path returns the underlying path for access. Path() string }
TemporaryDirectory models a closeable path for transient POSIX disk activities.
func NewTemporaryDirectory ¶
func NewTemporaryDirectory(name string, t T) (handler TemporaryDirectory)
NewTemporaryDirectory creates a new temporary directory for transient POSIX activities.
Click to show internal directories.
Click to hide internal directories.