Skip to content

Commit

Permalink
fix: add route
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Sukhin <vladislav@kubeshop.io>
  • Loading branch information
vsukhin committed Feb 12, 2025
1 parent 5997462 commit ac0c288
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions internal/app/api/v1/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ func (s *TestkubeAPI) Init(server server.HTTPServer) {
testWorkflows.Post("/:id/executions/:executionID/pause", s.PauseTestWorkflowExecutionHandler())
testWorkflows.Post("/:id/executions/:executionID/resume", s.ResumeTestWorkflowExecutionHandler())
testWorkflows.Get("/:id/executions/:executionID/logs", s.GetTestWorkflowExecutionLogsHandler())
testWorkflows.Post("/:id/executions/:executionID/rerun", s.ReRunTestWorkflowHandler())

testWorkflowExecutions := root.Group("/test-workflow-executions")
testWorkflowExecutions.Get("/", s.ListTestWorkflowExecutionsHandler())
Expand All @@ -181,6 +182,7 @@ func (s *TestkubeAPI) Init(server server.HTTPServer) {
testWorkflowExecutions.Get("/:executionID/artifacts", s.ListTestWorkflowExecutionArtifactsHandler())
testWorkflowExecutions.Get("/:executionID/artifacts/:filename", s.GetTestWorkflowArtifactHandler())
testWorkflowExecutions.Get("/:executionID/artifact-archive", s.GetTestWorkflowArtifactArchiveHandler())
testWorkflowExecutions.Post("/:executionID/rerun", s.ReRunTestWorkflowHandler())

testWorkflowWithExecutions := root.Group("/test-workflow-with-executions")
testWorkflowWithExecutions.Get("/", s.ListTestWorkflowWithExecutionsHandler())
Expand Down
4 changes: 2 additions & 2 deletions internal/app/api/v1/testworkflows.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ func (s *TestkubeAPI) ReRunTestWorkflowHandler() fiber.Handler {

errPrefix := "failed to rerun test workflow"

// Load the execution request
// Load the running comtext
var twrContext testkube.TestWorkflowRunningContext
err = c.BodyParser(&twrContext)
if err != nil && !errors.Is(err, fiber.ErrUnprocessableEntity) {
Expand Down Expand Up @@ -493,7 +493,7 @@ func (s *TestkubeAPI) ReRunTestWorkflowHandler() fiber.Handler {
}

if oldHash != newHash {
return s.ClientError(c, errPrefix, errors.New("current test workflow config spec doesn't match to execution one"))
return s.ClientError(c, errPrefix, errors.New("current test workflow config spec doesn't match the execution one"))
}
}

Expand Down

0 comments on commit ac0c288

Please sign in to comment.