mirror of
https://github.com/openfaas/faas.git
synced 2025-06-10 09:16:48 +00:00
Update test names
This commit is contained in:
parent
15f908c070
commit
9f2183f6f3
@ -82,8 +82,8 @@ func MakeAlertHandler(c *client.Client) http.HandlerFunc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(req.Alerts) > 0 {
|
if len(req.Alerts) > 0 {
|
||||||
err := scaleService(req, c)
|
|
||||||
if err != nil {
|
if err := scaleService(req, c); err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
} else {
|
} else {
|
||||||
|
@ -42,7 +42,7 @@ func fireRequestWithHeader(url string, method string, reqBody string, xheader st
|
|||||||
return string(body), res.StatusCode, readErr
|
return string(body), res.StatusCode, readErr
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_Get_Rejected(t *testing.T) {
|
func TestGet_Rejected(t *testing.T) {
|
||||||
var reqBody string
|
var reqBody string
|
||||||
_, code, err := fireRequest("http://localhost:8080/function/func_echoit", http.MethodGet, reqBody)
|
_, code, err := fireRequest("http://localhost:8080/function/func_echoit", http.MethodGet, reqBody)
|
||||||
if code != http.StatusInternalServerError {
|
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"
|
reqBody := "test message"
|
||||||
body, code, err := fireRequest("http://localhost:8080/function/func_echoit", http.MethodPost, reqBody)
|
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"
|
reqBody := "test message"
|
||||||
body, code, err := fireRequestWithHeader("http://localhost:8080/", http.MethodPost, reqBody, "func_echoit")
|
body, code, err := fireRequestWithHeader("http://localhost:8080/", http.MethodPost, reqBody, "func_echoit")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user