| 49 | } |
| 50 | |
| 51 | func (m *mockCmdReporter) Run(ctx context.Context, timeout time.Duration) (stdout, stderr string, retcode int, retErr error) { |
| 52 | args := m.Called(ctx, timeout) |
| 53 | return args.String(0), args.String(1), args.Int(2), args.Error(3) |
| 54 | } |
| 55 | |
| 56 | // returns a newCmdReporter function that returns the given mockCmdReporter and error |
| 57 | func mockNewCmdReporter(m *mockCmdReporter, err error) func(clientset kubernetes.Interface, ownerInfo *k8sutil.OwnerInfo, appName string, jobName string, jobNamespace string, cmd []string, args []string, rookImage string, runImage string, imagePullPolicy v1.PullPolicy, resources cephv1.ResourceSpec) (cmdreporter.CmdReporterInterface, error) { |