Esempio n. 1
0
func (m *mockScheduler) Submit(_ context.Context, app *scheduler.App, ss scheduler.StatusStream) error {
	// mock.Mock checks the order of slices, so sort by process name.
	p := processesByType(app.Processes)
	sort.Sort(p)
	app.Processes = p

	args := m.Called(app)
	return args.Error(0)
}
Esempio n. 2
0
func (m *mockScheduler) Run(_ context.Context, app *scheduler.App, process *scheduler.Process, in io.Reader, out io.Writer) error {
	app.Processes = nil // This is bogus and doesn't actually matter for Runs.
	args := m.Called(app, process, in, out)
	return args.Error(0)
}