Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPMainServer ¶
type HTTPMainServer struct {
// contains filtered or unexported fields
}
HTTPMainServer emulates http Server for TestMain. Do not initialize manualy, use ServerMain(m) instead.
func NewHTTPMainServer ¶
func NewHTTPMainServer(m *testing.M) *HTTPMainServer
func (*HTTPMainServer) Addr ¶
func (s *HTTPMainServer) Addr() string
func (*HTTPMainServer) Cleanup ¶
func (s *HTTPMainServer) Cleanup()
func (*HTTPMainServer) HandleFunc ¶
func (s *HTTPMainServer) HandleFunc(pattern string, handler http.HandlerFunc)
HandleFunc adds handler to test server.
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer emulates http Server. Do not initialize manualy, use Server(t) instead.
func NewHTTPServer ¶
func NewHTTPServer(t *testing.T) *HTTPServer
func (*HTTPServer) Addr ¶
func (s *HTTPServer) Addr() string
func (*HTTPServer) Cleanup ¶
func (s *HTTPServer) Cleanup()
func (*HTTPServer) HandleFunc ¶
func (s *HTTPServer) HandleFunc(pattern string, handler http.HandlerFunc)
HandleFunc adds handler to test server.
Click to show internal directories.
Click to hide internal directories.