Documentation ¶
Index ¶
- Constants
- func ExpectServerToRun(t *testing.T, name string, CreateServer scenarios.CreateServerFunc, ...)
- func ValidateSlowBodyRead(t *testing.T, name string, CreateServer scenarios.CreateServerFunc, ...)
- func ValidateSlowloris(t *testing.T, name string, CreateServer scenarios.CreateServerFunc, ...)
- type ConnStateCounter
- type TestContext
Constants ¶
View Source
const HTTPX_FAST = "HTTPX_FAST"
Set this environment variable to skip slow tests
Variables ¶
This section is empty.
Functions ¶
func ExpectServerToRun ¶
func ExpectServerToRun( t *testing.T, name string, CreateServer scenarios.CreateServerFunc, ApplyServer scenarios.ApplyServerFunc, ListenAndServe scenarios.ListenAndServeFunc, )
ExpectServerToRun creates test scenarios for validating a server serving behaviors.
func ValidateSlowBodyRead ¶
func ValidateSlowloris ¶
Types ¶
type ConnStateCounter ¶
type TestContext ¶
func (*TestContext) CreateFastCheckContext ¶
func (tc *TestContext) CreateFastCheckContext() (context.Context, context.CancelFunc)
func (*TestContext) ExpectToServeResponse ¶
func (tc *TestContext) ExpectToServeResponse( ctx context.Context, addr string, checkResp func(tc *TestContext, resp *http.Response, body []byte), )
func (*TestContext) ListenTCP ¶
func (tc *TestContext) ListenTCP() net.Listener
ListenTCP listens on the local TCP network with random port and returns the address. The connection will be closed when the test is finished.
Click to show internal directories.
Click to hide internal directories.