Jira RUN-1106 Volumes handlers updates

* Add tests to verify required fields in responses

Signed-off-by: Jhon Honce <jhonce@redhat.com>
This commit is contained in:
Jhon Honce
2020-12-04 14:21:27 -07:00
parent 8e83799d58
commit 9b11fc00f1
2 changed files with 53 additions and 2 deletions

View File

@ -223,7 +223,7 @@ func RemoveVolume(w http.ResponseWriter, r *http.Request) {
}
} else {
// Success
utils.WriteResponse(w, http.StatusNoContent, "")
utils.WriteResponse(w, http.StatusNoContent, nil)
}
} else {
if !query.Force {
@ -232,7 +232,7 @@ func RemoveVolume(w http.ResponseWriter, r *http.Request) {
// Volume does not exist and `force` is truthy - this emulates what
// Docker would do when told to `force` removal of a nonextant
// volume
utils.WriteResponse(w, http.StatusNoContent, "")
utils.WriteResponse(w, http.StatusNoContent, nil)
}
}
}