resp *http.Response err error ) BeforeEach(func() { uuid, err := uuid.NewV4() Expect(err).NotTo(HaveOccurred()) socket = fmt.Sprintf("/tmp/%s.sock", uuid) unixSocketListener, err = net.Listen("unix", socket) Expect(err).NotTo(HaveOccurred()) unixSocketServer = ghttp.NewUnstartedServer() unixSocketServer.HTTPTestServer = &httptest.Server{ Listener: unixSocketListener, Config: &http.Server{Handler: unixSocketServer}, } unixSocketServer.Start() client = http.Client{Transport: New(socket)} }) Context("when a simple GET request is sent", func() { BeforeEach(func() { unixSocketServer.AppendHandlers( ghttp.CombineHandlers( ghttp.VerifyRequest("GET", "/_ping"), ghttp.RespondWith(http.StatusOK, "true"), ), )