mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-06 13:47:35 +03:00
improve integration test error handling
This commit is contained in:
parent
f43c4c7f1a
commit
c672f461de
1 changed files with 3 additions and 0 deletions
|
@ -60,16 +60,19 @@ func setupHTTPHandlers() {
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
|
||||||
http.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
defer GinkgoRecover()
|
||||||
_, err := io.WriteString(w, "Hello, World!\n")
|
_, err := io.WriteString(w, "Hello, World!\n")
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
})
|
})
|
||||||
|
|
||||||
http.HandleFunc("/data", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/data", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
defer GinkgoRecover()
|
||||||
_, err := w.Write(data)
|
_, err := w.Write(data)
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
})
|
})
|
||||||
|
|
||||||
http.HandleFunc("/echo", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/echo", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
defer GinkgoRecover()
|
||||||
_, err := io.Copy(w, r.Body)
|
_, err := io.Copy(w, r.Body)
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue