From ec20e0253493735593cc8ddc2dbbe23bcc2ffd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Abdelkader=20Mart=C3=ADnez=20P=C3=A9rez?= Date: Thu, 5 Sep 2019 07:38:13 +0200 Subject: [PATCH] Make tests fail fast returning 501 Not Implemented error --- main.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/main.go b/main.go index 872e7f1..80ddc50 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,6 @@ import ( "fmt" b "github.com/BBVA/kapow/pkg/banner" "net/http" - "os/exec" ) func main() { @@ -22,17 +21,12 @@ type userServerHandler struct { } func (m *userServerHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - out, err := exec.Command("date").Output() - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - } else { - w.Write(out) - } + w.WriteHeader(http.StatusNotImplemented) } type controlAPIHandler struct { } func (m *controlAPIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - w.Write([]byte("Welcome to the control API!")) + w.WriteHeader(http.StatusNotImplemented) }