From f9d081accb5610102e43853146fb49828c07e390 Mon Sep 17 00:00:00 2001 From: John McCabe Date: Wed, 21 Mar 2018 17:48:22 +0000 Subject: [PATCH] Remove invalid UPDATE HTTP Method from watchdog The UPDATE HTTP Method isn't valid and not currently in use by the watchdog so removing it. Signed-off-by: John McCabe --- watchdog/main.go | 1 - watchdog/requesthandler_test.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/watchdog/main.go b/watchdog/main.go index adcd9b57..d4cc756c 100644 --- a/watchdog/main.go +++ b/watchdog/main.go @@ -301,7 +301,6 @@ func makeRequestHandler(config *WatchdogConfig) func(http.ResponseWriter, *http. http.MethodPost, http.MethodPut, http.MethodDelete, - "UPDATE", http.MethodGet: pipeRequest(config, w, r, r.Method) break diff --git a/watchdog/requesthandler_test.go b/watchdog/requesthandler_test.go index d4a9766d..5fb82be9 100644 --- a/watchdog/requesthandler_test.go +++ b/watchdog/requesthandler_test.go @@ -290,7 +290,7 @@ func TestHandler_RequestTimeoutFailsForExceededDuration(t *testing.T) { func TestHandler_StatusOKAllowed_ForWriteableVerbs(t *testing.T) { rr := httptest.NewRecorder() - verbs := []string{http.MethodPost, http.MethodPut, "UPDATE", http.MethodDelete} + verbs := []string{http.MethodPost, http.MethodPut, http.MethodDelete} for _, verb := range verbs { body := "hello" @@ -409,7 +409,7 @@ func TestHealthHandler_StatusInternalServerError_LockFileNotPresent(t *testing.T func TestHealthHandler_SatusMethoNotAllowed_ForWriteableVerbs(t *testing.T) { rr := httptest.NewRecorder() - verbs := []string{http.MethodPost, http.MethodPut, "UPDATE", http.MethodDelete} + verbs := []string{http.MethodPost, http.MethodPut, http.MethodDelete} for _, verb := range verbs { req, err := http.NewRequest(verb, "/_/health", nil)