From 8045298e374e36bb041dc13ff7f36208383e681c Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Tue, 25 May 2021 09:37:17 +0900 Subject: [PATCH] check error --- goveralls_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/goveralls_test.go b/goveralls_test.go index 4bbb556..c7a24bd 100644 --- a/goveralls_test.go +++ b/goveralls_test.go @@ -54,6 +54,10 @@ func fakeServer() *httptest.Server { func fakeServerWithPayloadChannel(payload chan Job) *httptest.Server { return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { body, err := ioutil.ReadAll(r.Body) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + return + } // query params are used for the body payload vals, err := url.ParseQuery(string(body)) if err != nil {