We on purpose never actually deal with accepted hijacked connections or server errors as in the context of where this function is used we don't care.
(logger logging.Logger, listener net.Listener)
| 119 | // We on purpose never actually deal with accepted hijacked connections or server errors |
| 120 | // as in the context of where this function is used we don't care. |
| 121 | func runUncheckedDummyAcceptor(logger logging.Logger, listener net.Listener) { |
| 122 | httpMux := http.NewServeMux() |
| 123 | httpMux.Handle(ipc.NewHijackAcceptor(logger, func(context.Context, io.ReadWriteCloser) {})) |
| 124 | server := &http.Server{Handler: httpMux} |
| 125 | go func() { |
| 126 | _ = server.Serve(listener) |
| 127 | }() |
| 128 | } |
| 129 | |
| 130 | func Test_restoreConfig(t *testing.T) { |
| 131 | tests := []struct { |
no test coverage detected