( ctx context.Context, spec *StartTaskSession, )
| 261 | } |
| 262 | |
| 263 | func (e *recordingSessionExecutor) StartTaskSession( |
| 264 | ctx context.Context, |
| 265 | spec *StartTaskSession, |
| 266 | ) (*SessionRef, error) { |
| 267 | if spec == nil { |
| 268 | return nil, fmtTestError("%w: start task session spec is required", ErrValidation) |
| 269 | } |
| 270 | e.startCalls = append(e.startCalls, *spec) |
| 271 | if e.onStart != nil { |
| 272 | e.onStart(ctx, spec) |
| 273 | } |
| 274 | if e.startErr != nil { |
| 275 | return nil, e.startErr |
| 276 | } |
| 277 | if e.returnNilStart { |
| 278 | return nil, nil |
| 279 | } |
| 280 | if e.startRef != nil { |
| 281 | ref := *e.startRef |
| 282 | return &ref, nil |
| 283 | } |
| 284 | return &SessionRef{SessionID: "sess-start-" + strconv.Itoa(len(e.startCalls))}, nil |
| 285 | } |
| 286 | |
| 287 | func (e *recordingSessionExecutor) AttachTaskSession( |
| 288 | _ context.Context, |
nothing calls this directly
no test coverage detected