Skip to content

Commit

Permalink
Merge 9deb8e8 into 4ad625c
Browse files Browse the repository at this point in the history
  • Loading branch information
kmtym1998 committed Aug 20, 2023
2 parents 4ad625c + 9deb8e8 commit 15e5cb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/v1/setup_teardown_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func handleRunSetup(cs *ControlSurface, rw http.ResponseWriter, r *http.Request)
runner := cs.RunState.Runner

if err := cs.RunState.Runner.Setup(r.Context(), cs.Samples); err != nil {
cs.RunState.Logger.WithError(err).Error("Error executing setup")
apiError(rw, "Error executing setup", err.Error(), http.StatusInternalServerError)
return
}
Expand All @@ -81,6 +82,7 @@ func handleRunSetup(cs *ControlSurface, rw http.ResponseWriter, r *http.Request)
// handleRunTeardown executes the runner's Teardown() method
func handleRunTeardown(cs *ControlSurface, rw http.ResponseWriter, r *http.Request) {
if err := cs.RunState.Runner.Teardown(r.Context(), cs.Samples); err != nil {
cs.RunState.Logger.WithError(err).Error("Error executing teardown")
apiError(rw, "Error executing teardown", err.Error(), http.StatusInternalServerError)
}
}

0 comments on commit 15e5cb0

Please sign in to comment.