File tree 2 files changed +2
-10
lines changed
2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -60,22 +60,14 @@ func New(opts RunnerOpts) Runner {
60
60
r = & LocalRunner {
61
61
k6path : opts .Uri ,
62
62
logger : & logger ,
63
+ blacklistedIP : opts .BlacklistedIP ,
63
64
fs : afero .NewOsFs (),
64
- blacklistedIP : "10.0.0.0/8" ,
65
65
}
66
-
67
- r .(* LocalRunner ).withOpts (opts )
68
66
}
69
67
70
68
return r
71
69
}
72
70
73
- func (r * LocalRunner ) withOpts (opts RunnerOpts ) {
74
- if opts .BlacklistedIP != "" {
75
- r .blacklistedIP = opts .BlacklistedIP
76
- }
77
- }
78
-
79
71
// Processor runs a script with a runner and parses the k6 output.
80
72
type Processor struct {
81
73
runner Runner
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import (
25
25
func TestNew (t * testing.T ) {
26
26
r1 := New (RunnerOpts {Uri : "k6" })
27
27
require .IsType (t , & LocalRunner {}, r1 )
28
- require .Equal (t , "10.0.0.0/8 " , r1 .(* LocalRunner ).blacklistedIP )
28
+ require .Equal (t , "" , r1 .(* LocalRunner ).blacklistedIP )
29
29
r2 := New (RunnerOpts {Uri : "/usr/bin/k6" , BlacklistedIP : "192.168.4.0/24" })
30
30
require .IsType (t , & LocalRunner {}, r2 )
31
31
require .Equal (t , "192.168.4.0/24" , r2 .(* LocalRunner ).blacklistedIP )
You can’t perform that action at this time.
0 commit comments