Skip to content

Commit

Permalink
Merge pull request #80 from Dewberry/patch/list-jobs-handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ar-siddiqui authored Dec 6, 2023
2 parents dfba12d + 8555584 commit 34da1f2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 42 deletions.
7 changes: 0 additions & 7 deletions api/handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,13 +548,6 @@ func (rh *RESTHandler) ListJobsHandler(c echo.Context) error {
if processIDs != "" {
processIDList = strings.Split(processIDs, ",")
}
for _, pid := range processIDList {
_, _, err = rh.ProcessList.Get(pid)
if err != nil {
output := errResponse{HTTPStatus: http.StatusBadRequest, Message: fmt.Sprintf("processID %s incorrect, no such process exist", pid)}
return prepareResponse(c, http.StatusBadRequest, "error", output)
}
}

var statusList []string
if statuses != "" {
Expand Down
36 changes: 1 addition & 35 deletions tests/e2e/tests.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -1720,40 +1720,6 @@
}
},
"response": []
},
{
"name": "fetch-with-invalid-processID",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{url}}/jobs?processID=invalidProcessID",
"host": [
"{{url}}"
],
"path": [
"jobs"
],
"query": [
{
"key": "processID",
"value": "invalidProcessID"
}
]
}
},
"response": []
}
],
"event": [
Expand Down Expand Up @@ -1846,4 +1812,4 @@
"value": ""
}
]
}
}

0 comments on commit 34da1f2

Please sign in to comment.