From 9f2183f6f3ad5634bb527befa04b337215c449d4 Mon Sep 17 00:00:00 2001 From: Alex Ellis <alexellis2@gmail.com> Date: Tue, 21 Feb 2017 19:09:11 +0000 Subject: [PATCH] Update test names --- gateway/handlers/alerthandler.go | 4 ++-- gateway/tests/integration/routes_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gateway/handlers/alerthandler.go b/gateway/handlers/alerthandler.go index 10d0271a..b29654b4 100644 --- a/gateway/handlers/alerthandler.go +++ b/gateway/handlers/alerthandler.go @@ -82,8 +82,8 @@ func MakeAlertHandler(c *client.Client) http.HandlerFunc { } if len(req.Alerts) > 0 { - err := scaleService(req, c) - if err != nil { + + if err := scaleService(req, c); err != nil { log.Println(err) w.WriteHeader(http.StatusInternalServerError) } else { diff --git a/gateway/tests/integration/routes_test.go b/gateway/tests/integration/routes_test.go index a3d68f00..9560f6bc 100644 --- a/gateway/tests/integration/routes_test.go +++ b/gateway/tests/integration/routes_test.go @@ -42,7 +42,7 @@ func fireRequestWithHeader(url string, method string, reqBody string, xheader st return string(body), res.StatusCode, readErr } -func Test_Get_Rejected(t *testing.T) { +func TestGet_Rejected(t *testing.T) { var reqBody string _, code, err := fireRequest("http://localhost:8080/function/func_echoit", http.MethodGet, reqBody) if code != http.StatusInternalServerError { @@ -56,7 +56,7 @@ func Test_Get_Rejected(t *testing.T) { } -func Test_EchoIt_Post_Route_Handler(t *testing.T) { +func TestEchoIt_Post_Route_Handler(t *testing.T) { reqBody := "test message" body, code, err := fireRequest("http://localhost:8080/function/func_echoit", http.MethodPost, reqBody) @@ -73,7 +73,7 @@ func Test_EchoIt_Post_Route_Handler(t *testing.T) { } } -func Test_EchoIt_Post_Header_Handler(t *testing.T) { +func TestEchoIt_Post_Header_Handler(t *testing.T) { reqBody := "test message" body, code, err := fireRequestWithHeader("http://localhost:8080/", http.MethodPost, reqBody, "func_echoit") -- GitLab