From cc3a94f6b4b9516b90280e7b6cc6403d1b1da381 Mon Sep 17 00:00:00 2001 From: Lucas Clemente Date: Fri, 3 Jun 2016 21:02:57 +0200 Subject: [PATCH] handle errors in integration test http.Handlers --- h2quic/integration_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/h2quic/integration_test.go b/h2quic/integration_test.go index 88254836..37d7faad 100644 --- a/h2quic/integration_test.go +++ b/h2quic/integration_test.go @@ -37,15 +37,18 @@ var _ = Describe("Integration tests", func() { ) http.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, "Hello, World!\n") + _, err := io.WriteString(w, "Hello, World!\n") + Expect(err).NotTo(HaveOccurred()) }) http.HandleFunc("/data", func(w http.ResponseWriter, r *http.Request) { - w.Write(data) + _, err := w.Write(data) + Expect(err).NotTo(HaveOccurred()) }) http.HandleFunc("/echo", func(w http.ResponseWriter, r *http.Request) { - io.Copy(w, r.Body) + _, err := io.Copy(w, r.Body) + Expect(err).NotTo(HaveOccurred()) }) BeforeSuite(func() {