Example #1
0
func TestTryMangleURL_Basic(t *testing.T) {
	resp := mock.ResponseFromString("")
	resp.StatusCode = 200
	client := &mock.MockClient{
		ForeverResponse: resp,
	}
	ss := &settings.ScanSettings{
		SpiderCodes: []int{200},
		Mangle:      true,
	}
	rchan := make(chan results.Result)
	go func() {
		for range rchan {
		}
	}()
	w := &Worker{
		client:   client,
		settings: ss,
		rchan:    rchan,
		adder:    noopUrl,
	}
	u := &url.URL{Scheme: "http", Host: "localhost", Path: "/"}
	w.TryMangleURL(u)
	// TODO: check which requests were made
}
Example #2
0
func TestTryURL_Basic(t *testing.T) {
	resp := mock.ResponseFromString("")
	resp.StatusCode = 200
	u := &url.URL{Scheme: "http", Host: "localhost", Path: "/"}
	TryURLHelper(u, resp)
	// TODO: check which requests were made
}