Skip to content

Commit

Permalink
fix: windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio VS committed Mar 23, 2022
1 parent 13d85eb commit cf89ce0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"testing"
"time"

gbytes "github.com/savsgio/gotils/bytes"
"github.com/valyala/fasthttp"
)

Expand Down Expand Up @@ -625,7 +624,9 @@ func testRouterNotFoundByMethod(t *testing.T, method string) {
for _, tr := range testRoutes {
if runtime.GOOS == "windows" && strings.HasPrefix(tr.route, "/../") {
// See: https://github.com/valyala/fasthttp/issues/1226
t.Logf("skipping route %s on %s, unsupported yet", tr.route, runtime.GOOS)
t.Logf("skipping route '%s %s' on %s, unsupported yet", reqMethod, tr.route, runtime.GOOS)

continue
}

ctx := new(fasthttp.RequestCtx)
Expand Down Expand Up @@ -704,7 +705,7 @@ func TestRouterNotFound_MethodWild(t *testing.T) {
for i := 0; i < 100; i++ {
router.Handle(
randomHTTPMethod(),
fmt.Sprintf("/%s", gbytes.Rand(make([]byte, 5))),
fmt.Sprintf("/%d", rand.Int63()),
func(ctx *fasthttp.RequestCtx) {},
)
}
Expand Down

0 comments on commit cf89ce0

Please sign in to comment.