Skip to content

Commit

Permalink
Added check for invalid skipFirst value
Browse files Browse the repository at this point in the history
  • Loading branch information
Sujit D'Mello committed Jul 10, 2020
1 parent d58bcb9 commit 7906e7c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runner/options.go
Expand Up @@ -585,6 +585,9 @@ func newConfig(call, host string, options ...Option) (*RunConfig, error) {
return nil, errors.New("Host required")
}

if c.skipFirst > 0 && int(c.skipFirst) > c.n {
return nil, errors.New("You cannot skip more requests than those run")
}
creds, err := createClientTransportCredentials(
c.skipVerify,
c.cacert,
Expand Down

0 comments on commit 7906e7c

Please sign in to comment.