diff --git a/update/update_test.go b/update/update_test.go index 6a9261df..b3c8643e 100644 --- a/update/update_test.go +++ b/update/update_test.go @@ -12,7 +12,8 @@ import ( ) func startHTTPServer(data string) (net.Listener, uint16) { - http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + mux := http.NewServeMux() + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { _, _ = w.Write([]byte(data)) }) @@ -21,7 +22,7 @@ func startHTTPServer(data string) (net.Listener, uint16) { panic(err) } - go func() { _ = http.Serve(listener, nil) }() + go func() { _ = http.Serve(listener, mux) }() return listener, uint16(listener.Addr().(*net.TCPAddr).Port) }