Skip to content

Commit

Permalink
Merge pull request #19183 from eriksjolund/add_missing_return
Browse files Browse the repository at this point in the history
Add missing return after utils.InternalServerError()
  • Loading branch information
openshift-merge-robot authored Jul 13, 2023
2 parents 0285bc1 + 6ec261e commit eb2bf7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/api/handlers/libpod/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ func PodStats(w http.ResponseWriter, r *http.Request) {
options := entities.PodStatsOptions{All: query.All}
if err := entities.ValidatePodStatsOptions(query.NamesOrIDs, &options); err != nil {
utils.InternalServerError(w, err)
return
}

var flush = func() {}
Expand Down
4 changes: 4 additions & 0 deletions test/apiv2/40-pods.at
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ t GET libpod/pods/stats?namesOrIDs=fakename 404 \
.cause="no such pod" \
.message="unable to get list of pods: no pod with name or ID fakename found: no such pod"

t GET "libpod/pods/stats?all=true&namesOrIDs=foo" 500 \
.cause="--all, --latest and arguments cannot be used together" \
.message="--all, --latest and arguments cannot be used together"

t DELETE libpod/pods/bar?force=true 200

# test the fake name
Expand Down

0 comments on commit eb2bf7a

Please sign in to comment.