Add unit tests for DetectAuthType function
This commit is contained in:
committed by
Brendan Le Glaunec
parent
260a9645be
commit
862e9f3de9
@@ -101,13 +101,7 @@ func DetectAuthMethods(c Curler, targets []Stream, timeout time.Duration, log bo
|
||||
attacks := make(chan Stream)
|
||||
defer close(attacks)
|
||||
|
||||
validate := v.New()
|
||||
for i := range targets {
|
||||
err := validate.Struct(targets[i])
|
||||
if err != nil {
|
||||
return targets, errors.Wrap(err, "invalid targets")
|
||||
}
|
||||
|
||||
targets[i].AuthenticationType = detectAuthMethod(c, targets[i], timeout, log)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user