Reword error message when no stream is found
This commit is contained in:
committed by
Brendan Le Glaunec
parent
defc308a9d
commit
9f05634531
@@ -24,7 +24,7 @@ const (
|
|||||||
// Attack attacks the given targets and returns the accessed streams.
|
// Attack attacks the given targets and returns the accessed streams.
|
||||||
func (s *Scanner) Attack(targets []Stream) ([]Stream, error) {
|
func (s *Scanner) Attack(targets []Stream) ([]Stream, error) {
|
||||||
if len(targets) == 0 {
|
if len(targets) == 0 {
|
||||||
return nil, fmt.Errorf("unable to attack empty list of targets")
|
return nil, fmt.Errorf("no stream found")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Most cameras will be accessed successfully with these two attacks.
|
// Most cameras will be accessed successfully with these two attacks.
|
||||||
|
|||||||
+1
-1
@@ -89,7 +89,7 @@ func TestAttack(t *testing.T) {
|
|||||||
targets: nil,
|
targets: nil,
|
||||||
|
|
||||||
expectedStreams: nil,
|
expectedStreams: nil,
|
||||||
expectedErr: errors.New("unable to attack empty list of targets"),
|
expectedErr: errors.New("no stream found"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user