mirror of
https://github.com/openfaas/faas.git
synced 2025-06-19 04:26:35 +00:00
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 <john@johnmccabe.net>
This commit is contained in:
@ -301,7 +301,6 @@ func makeRequestHandler(config *WatchdogConfig) func(http.ResponseWriter, *http.
|
|||||||
http.MethodPost,
|
http.MethodPost,
|
||||||
http.MethodPut,
|
http.MethodPut,
|
||||||
http.MethodDelete,
|
http.MethodDelete,
|
||||||
"UPDATE",
|
|
||||||
http.MethodGet:
|
http.MethodGet:
|
||||||
pipeRequest(config, w, r, r.Method)
|
pipeRequest(config, w, r, r.Method)
|
||||||
break
|
break
|
||||||
|
@ -290,7 +290,7 @@ func TestHandler_RequestTimeoutFailsForExceededDuration(t *testing.T) {
|
|||||||
func TestHandler_StatusOKAllowed_ForWriteableVerbs(t *testing.T) {
|
func TestHandler_StatusOKAllowed_ForWriteableVerbs(t *testing.T) {
|
||||||
rr := httptest.NewRecorder()
|
rr := httptest.NewRecorder()
|
||||||
|
|
||||||
verbs := []string{http.MethodPost, http.MethodPut, "UPDATE", http.MethodDelete}
|
verbs := []string{http.MethodPost, http.MethodPut, http.MethodDelete}
|
||||||
for _, verb := range verbs {
|
for _, verb := range verbs {
|
||||||
|
|
||||||
body := "hello"
|
body := "hello"
|
||||||
@ -409,7 +409,7 @@ func TestHealthHandler_StatusInternalServerError_LockFileNotPresent(t *testing.T
|
|||||||
func TestHealthHandler_SatusMethoNotAllowed_ForWriteableVerbs(t *testing.T) {
|
func TestHealthHandler_SatusMethoNotAllowed_ForWriteableVerbs(t *testing.T) {
|
||||||
rr := httptest.NewRecorder()
|
rr := httptest.NewRecorder()
|
||||||
|
|
||||||
verbs := []string{http.MethodPost, http.MethodPut, "UPDATE", http.MethodDelete}
|
verbs := []string{http.MethodPost, http.MethodPut, http.MethodDelete}
|
||||||
|
|
||||||
for _, verb := range verbs {
|
for _, verb := range verbs {
|
||||||
req, err := http.NewRequest(verb, "/_/health", nil)
|
req, err := http.NewRequest(verb, "/_/health", nil)
|
||||||
|
Reference in New Issue
Block a user