(r *SessionRunner)
| 99 | } |
| 100 | |
| 101 | func (s *StepAPIWithOptionalArgs) Run(r *SessionRunner) (stepResult *StepResult, err error) { |
| 102 | defer func() { |
| 103 | stepResult.StepType = stepTypeAPI |
| 104 | }() |
| 105 | // extend request with referenced API |
| 106 | api, _ := s.step.API.(*API) |
| 107 | step := &TStep{} |
| 108 | // deep copy step to avoid data racing |
| 109 | if err = copier.Copy(step, s.step); err != nil { |
| 110 | log.Error().Err(err).Msg("copy step failed") |
| 111 | return |
| 112 | } |
| 113 | extendWithAPI(step, api) |
| 114 | stepResult, err = runStepRequest(r, step) |
| 115 | return |
| 116 | } |
| 117 | |
| 118 | // extend teststep with api, teststep will merge and override referenced api |
| 119 | func extendWithAPI(testStep *TStep, overriddenStep *API) { |
nothing calls this directly
no test coverage detected