Skip to content

Commit

Permalink
build(deps): bump pgregory.net/rapid from 0.3.3 to 1.0.0
Browse files Browse the repository at this point in the history
Bumps [pgregory.net/rapid](https://github.com/flyingmutant/rapid) from 0.3.3 to 1.0.0.
- [Release notes](https://github.com/flyingmutant/rapid/releases)
- [Commits](flyingmutant/rapid@v0.3.3...v1.0.0)

---
updated-dependencies:
- dependency-name: pgregory.net/rapid
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Tomás Senart <tsenart@gmail.com>
  • Loading branch information
dependabot[bot] authored and tsenart committed Jul 15, 2023
1 parent 8ccf2ae commit dd4d39f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/streadway/quantile v0.0.0-20220407130108-4246515d968d
github.com/tsenart/go-tsz v0.0.0-20180814235614-0bd30b3df1c3
golang.org/x/net v0.12.0
pgregory.net/rapid v0.3.3
pgregory.net/rapid v1.0.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca h1:PupagGYwj8+I4ubCxcmcBRk3VlUWtTg5huQpZR9flmE=
gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
pgregory.net/rapid v0.3.3 h1:jCjBsY4ln4Atz78QoBWxUEvAHaFyNDQg9+WU62aCn1U=
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
pgregory.net/rapid v1.0.0 h1:iQaM2w5PZ6xvt6x7hbd7tiDS+nk7YPp5uCaEba+T/F4=
pgregory.net/rapid v1.0.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
24 changes: 12 additions & 12 deletions lib/results_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,21 @@ func TestResultEncoding(t *testing.T) {
hdrs := rapid.MapOf(
rapid.StringMatching("^[!#$%&'*+\\-.^_`|~0-9a-zA-Z]+$"),
rapid.SliceOfN(rapid.StringMatching(`^[0-9a-zA-Z]+$`), 1, -1),
).Draw(t, "headers").(map[string][]string)
).Draw(t, "headers")

want := Result{
Attack: rapid.StringMatching(`^\w+$`).Draw(t, "attack").(string),
Seq: rapid.Uint64().Draw(t, "seq").(uint64),
Code: rapid.Uint16().Draw(t, "code").(uint16),
Timestamp: time.Unix(rapid.Int64Range(0, 1e8).Draw(t, "timestamp").(int64), 0),
Latency: time.Duration(rapid.Int64Min(0).Draw(t, "latency").(int64)),
BytesIn: rapid.Uint64().Draw(t, "bytes_in").(uint64),
BytesOut: rapid.Uint64().Draw(t, "bytes_out").(uint64),
Error: rapid.StringMatching(`^\w+$`).Draw(t, "error").(string),
Body: rapid.SliceOf(rapid.Byte()).Draw(t, "body").([]byte),
Attack: rapid.StringMatching(`^\w+$`).Draw(t, "attack"),
Seq: rapid.Uint64().Draw(t, "seq"),
Code: rapid.Uint16().Draw(t, "code"),
Timestamp: time.Unix(rapid.Int64Range(0, 1e8).Draw(t, "timestamp"), 0),
Latency: time.Duration(rapid.Int64Min(0).Draw(t, "latency")),
BytesIn: rapid.Uint64().Draw(t, "bytes_in"),
BytesOut: rapid.Uint64().Draw(t, "bytes_out"),
Error: rapid.StringMatching(`^\w+$`).Draw(t, "error"),
Body: rapid.SliceOf(rapid.Byte()).Draw(t, "body"),
Method: rapid.StringMatching("^(GET|PUT|POST|DELETE|HEAD|OPTIONS)$").
Draw(t, "method").(string),
URL: rapid.StringMatching(`^(https?):\/\/([a-zA-Z0-9-\.]+)(:[0-9]{1,5})?\/?([a-zA-Z0-9\-\._\?\,\'\/\\\+&amp;%\$#\=~]*)$`).Draw(t, "url").(string),
Draw(t, "method"),
URL: rapid.StringMatching(`^(https?):\/\/([a-zA-Z0-9-\.]+)(:[0-9]{1,5})?\/?([a-zA-Z0-9\-\._\?\,\'\/\\\+&amp;%\$#\=~]*)$`).Draw(t, "url"),
}

if len(hdrs) > 0 {
Expand Down

0 comments on commit dd4d39f

Please sign in to comment.