func setExecuterExpectations(mockExecuter *executers.MockCommandExecuter, t TestCase, cancelFlag task.CancelFlag, p *Plugin) { orchestrationDir := filepath.Join(orchestrationDirectory, fileutil.RemoveInvalidChars(t.Input.ID)) stdoutFilePath := filepath.Join(orchestrationDir, p.StdoutFileName) stderrFilePath := filepath.Join(orchestrationDir, p.StderrFileName) mockExecuter.On("Execute", mock.Anything, t.Input.WorkingDirectory, stdoutFilePath, stderrFilePath, cancelFlag, mock.Anything, mock.Anything, mock.Anything).Return( readerFromString(t.Output.Stdout), readerFromString(t.Output.Stderr), t.Output.ExitCode, t.ExecuterErrors) }