diff options
author | Anton Titov <[email protected]> | 2019-12-23 14:52:14 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-23 14:52:14 +0300 |
commit | e90fb03d058c4d61418dc2ef49660c7ba4badbd3 (patch) | |
tree | 00b16331b9ff3b3b846ba22989dddde721cc959d /service/http | |
parent | 2093cb9058f94668fff0a97beb76b0cab66c7b63 (diff) | |
parent | 921e1f55e23ab75b8250045916c8d1ffad1b8bde (diff) |
Merge pull request #206 from ValeryPiashchynski/Fix_warning_and_issues
[wip] Fixed the issues and warnings from linters
Diffstat (limited to 'service/http')
-rw-r--r-- | service/http/h2c_test.go | 7 | ||||
-rw-r--r-- | service/http/handler_test.go | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/service/http/h2c_test.go b/service/http/h2c_test.go index e2669845..7bbc30ac 100644 --- a/service/http/h2c_test.go +++ b/service/http/h2c_test.go @@ -36,7 +36,12 @@ func Test_Service_H2C(t *testing.T) { // should do nothing s.(*Service).Stop() - go func() { c.Serve() }() + go func() { + err := c.Serve() + if err != nil { + t.Errorf("error serving: %v", err) + } + }() time.Sleep(time.Millisecond * 100) defer c.Stop() diff --git a/service/http/handler_test.go b/service/http/handler_test.go index 4efcdd00..994a663c 100644 --- a/service/http/handler_test.go +++ b/service/http/handler_test.go @@ -1043,6 +1043,7 @@ func TestHandler_Multipart_POST(t *testing.T) { } err = w.WriteField("arr[x][y][e]", "f") + if err != nil { t.Errorf("error writing the field: error %v", err) } @@ -1138,6 +1139,7 @@ func TestHandler_Multipart_PUT(t *testing.T) { } err = w.WriteField("name[]", "name1") + if err != nil { t.Errorf("error writing the field: error %v", err) } @@ -1234,6 +1236,7 @@ func TestHandler_Multipart_PATCH(t *testing.T) { go func() { err := hs.ListenAndServe() + if err != nil && err != http.ErrServerClosed { t.Errorf("error listening the interface: error %v", err) } @@ -1258,11 +1261,13 @@ func TestHandler_Multipart_PATCH(t *testing.T) { } err = w.WriteField("name[]", "name2") + if err != nil { t.Errorf("error writing the field: error %v", err) } err = w.WriteField("name[]", "name3") + if err != nil { t.Errorf("error writing the field: error %v", err) } |