From 9b11fc00f1b4492ab6d80101436941d88fa5dd01 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Fri, 4 Dec 2020 14:21:27 -0700 Subject: Jira RUN-1106 Volumes handlers updates * Add tests to verify required fields in responses Signed-off-by: Jhon Honce --- pkg/api/handlers/compat/volumes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/api/handlers/compat') diff --git a/pkg/api/handlers/compat/volumes.go b/pkg/api/handlers/compat/volumes.go index a3c9fbd2f..71b848932 100644 --- a/pkg/api/handlers/compat/volumes.go +++ b/pkg/api/handlers/compat/volumes.go @@ -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) } } } -- cgit v1.2.3-54-g00ecf