MCPcopy
hub / github.com/tsenart/vegeta / TestBadTargeterError

Function TestBadTargeterError

lib/attack_test.go:208–216  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

206}
207
208func TestBadTargeterError(t *testing.T) {
209 t.Parallel()
210 atk := NewAttacker()
211 tr := func(*Target) error { return io.EOF }
212 res := atk.hit(tr, &attack{name: "", began: time.Now()})
213 if got, want := res.Error, io.EOF.Error(); got != want {
214 t.Fatalf("got: %v, want: %v", got, want)
215 }
216}
217
218func TestResponseBodyCapture(t *testing.T) {
219 t.Parallel()

Callers

nothing calls this directly

Calls 2

hitMethod · 0.95
NewAttackerFunction · 0.85

Tested by

no test coverage detected