MCPcopy Create free account
hub / github.com/chainreactors/spray / TestBuild_FuzzInPath

Function TestBuild_FuzzInPath

core/ihttp/request_fuzz_test.go:9–23  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestBuild_FuzzInPath(t *testing.T) {
10 rc := &RequestConfig{
11 Method: "GET",
12 Headers: make(http.Header),
13 Path: "/api/{{FUZZ}}/info",
14 }
15 req, err := rc.Build(context.Background(), STANDARD, "http://example.com", "", "", "admin")
16 if err != nil {
17 t.Fatal(err)
18 }
19 uri := req.URI()
20 if uri != "http://example.com/api/admin/info" {
21 t.Errorf("URI = %q, want http://example.com/api/admin/info", uri)
22 }
23}
24
25func TestBuild_FuzzInHost(t *testing.T) {
26 rc := &RequestConfig{

Callers

nothing calls this directly

Calls 2

BuildMethod · 0.95
URIMethod · 0.80

Tested by

no test coverage detected