CreateJob calls CreateJobFunc.
(ctx context.Context, owner string, repo string, problemStatement string, baseBranch string, customAgent string)
| 152 | |
| 153 | // CreateJob calls CreateJobFunc. |
| 154 | func (mock *CapiClientMock) CreateJob(ctx context.Context, owner string, repo string, problemStatement string, baseBranch string, customAgent string) (*Job, error) { |
| 155 | if mock.CreateJobFunc == nil { |
| 156 | panic("CapiClientMock.CreateJobFunc: method is nil but CapiClient.CreateJob was just called") |
| 157 | } |
| 158 | callInfo := struct { |
| 159 | Ctx context.Context |
| 160 | Owner string |
| 161 | Repo string |
| 162 | ProblemStatement string |
| 163 | BaseBranch string |
| 164 | CustomAgent string |
| 165 | }{ |
| 166 | Ctx: ctx, |
| 167 | Owner: owner, |
| 168 | Repo: repo, |
| 169 | ProblemStatement: problemStatement, |
| 170 | BaseBranch: baseBranch, |
| 171 | CustomAgent: customAgent, |
| 172 | } |
| 173 | mock.lockCreateJob.Lock() |
| 174 | mock.calls.CreateJob = append(mock.calls.CreateJob, callInfo) |
| 175 | mock.lockCreateJob.Unlock() |
| 176 | return mock.CreateJobFunc(ctx, owner, repo, problemStatement, baseBranch, customAgent) |
| 177 | } |
| 178 | |
| 179 | // CreateJobCalls gets all the calls that were made to CreateJob. |
| 180 | // Check the length with: |
nothing calls this directly
no outgoing calls
no test coverage detected