Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProjectRunnerMock ¶
type ProjectRunnerMock struct {
// RunTargetFunc mocks the RunTarget method.
RunTargetFunc func(target string, opts ...earthly.EarthlyExecutorOption) error
// contains filtered or unexported fields
}
ProjectRunnerMock is a mock implementation of run.ProjectRunner.
func TestSomethingThatUsesProjectRunner(t *testing.T) {
// make and configure a mocked run.ProjectRunner
mockedProjectRunner := &ProjectRunnerMock{
RunTargetFunc: func(target string, opts ...earthly.EarthlyExecutorOption) error {
panic("mock out the RunTarget method")
},
}
// use mockedProjectRunner in code that requires run.ProjectRunner
// and then make assertions.
}
func (*ProjectRunnerMock) RunTarget ¶
func (mock *ProjectRunnerMock) RunTarget(target string, opts ...earthly.EarthlyExecutorOption) error
RunTarget calls RunTargetFunc.
func (*ProjectRunnerMock) RunTargetCalls ¶
func (mock *ProjectRunnerMock) RunTargetCalls() []struct { Target string Opts []earthly.EarthlyExecutorOption }
RunTargetCalls gets all the calls that were made to RunTarget. Check the length with:
len(mockedProjectRunner.RunTargetCalls())
Click to show internal directories.
Click to hide internal directories.