mocks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecCommandCall added in v0.2.0

type ExecCommandCall struct {
	// contains filtered or unexported fields
}

ExecCommandCall is returned by OnExecCommand, see its methods to set the return value.

func (*ExecCommandCall) ExecBash added in v0.2.0

func (c *ExecCommandCall) ExecBash(shell string) *mock.Call

ExecBash configures the mock to run a bash one-liner instead of the specified command. Do this to avoid failing if the command is not available, or you want to be resilient to its behaviour changing.

func (*ExecCommandCall) Run added in v0.2.0

func (c *ExecCommandCall) Run() *mock.Call

Run configures the mock to actually run the specified command. Do this if the invoked command is a build dependency of your project and you control the side effets. Otherwise, see ExecBash instead.

type Owl

type Owl struct {
	mock.Mock
}

Owl is an autogenerated mock type for the Owl type

func (*Owl) Errorf

func (_m *Owl) Errorf(format string, args ...interface{})

Errorf provides a mock function with given fields: format, args

func (*Owl) ExecCommand added in v0.2.0

func (_m *Owl) ExecCommand(name string, arg ...string) *exec.Cmd

ExecCommand provides a mock function with given fields: name, arg

func (*Owl) ExpectAssertFailure

func (_m *Owl) ExpectAssertFailure(t *testing.T, contains string)

ExpectAssertFailure configures the mock to expect a testify/assert failure containing the given string.

func (*Owl) ExpectRequireFailure

func (_m *Owl) ExpectRequireFailure(t *testing.T, contains string)

ExpectRequireFailure configures the mock to expect a testify/require failure containing the given string.

func (*Owl) FailNow

func (_m *Owl) FailNow()

FailNow provides a mock function with given fields:

func (*Owl) IsVerbose

func (_m *Owl) IsVerbose() bool

IsVerbose provides a mock function with given fields:

func (*Owl) OnExecCommand added in v0.2.0

func (_m *Owl) OnExecCommand(name string, arg ...string) *ExecCommandCall

OnExecCommand configures the mock to expect a call to ExecCommand and returns a ExecCommandCall that can be used to define what to return.

func (*Owl) Printf

func (_m *Owl) Printf(format string, a ...interface{})

Printf provides a mock function with given fields: format, a

func (*Owl) Println

func (_m *Owl) Println(a ...interface{})

Println provides a mock function with given fields: a

Jump to

Keyboard shortcuts

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