tests

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunOnHijackedLogrusOutput

func RunOnHijackedLogrusOutput(t *testing.T, handler func(t *testing.T, output *bytes.Buffer))

func RunOnTempDir

func RunOnTempDir(t *testing.T, prefix string, handler func(t *testing.T, dir string))

func RunWithTempFile

func RunWithTempFile(t *testing.T, dir string, prefix string, handler func(t *testing.T, file string))

Types

type MockReadCloser

type MockReadCloser struct {
	mock.Mock
}

MockReadCloser is an autogenerated mock type for the ReadCloser type

func (*MockReadCloser) Close

func (_m *MockReadCloser) Close() error

Close provides a mock function with given fields:

func (*MockReadCloser) Read

func (_m *MockReadCloser) Read(p []byte) (int, error)

Read provides a mock function with given fields: p

type ReadCloser

type ReadCloser interface {
	Read(p []byte) (n int, err error)
	Close() error
}

Jump to

Keyboard shortcuts

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