Documentation
¶
Overview ¶
Package testtarget provides a deterministic mock HTTP target for ffuf integration tests. It models the response dimensions ffuf matches and filters on (status code, body size, word count, line count, latency, reflection, soft-404 baselines, redirects, request-gated endpoints, and a nested directory tree for recursion) and records every request it receives.
The server is hermetic: it binds to an ephemeral localhost port via httptest, uses no randomness, and returns byte-identical responses for identical requests. That determinism is what lets integration tests assert on exact result sets. Point the real ffuf http runner at Target.URL and only the target and the output sink are test doubles; the engine, runner, matchers and filters are the real ones.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Recorded ¶
type Recorded struct {
Method string
Path string
Query string
Header http.Header
Body string
At time.Time
}
Recorded is one request the target received, exposed via Target.Requests so a test can assert on what ffuf actually sent (method, headers, body, timing).