mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-13 15:46:49 +03:00
Use a directory we are sure to exist for tests
This commit is contained in:
+4
-4
@@ -754,16 +754,16 @@ func TestServeFileDirectoryRedirect(t *testing.T) {
|
||||
|
||||
ctx.Request.Reset()
|
||||
ctx.Response.Reset()
|
||||
ServeFile(&ctx, ".git")
|
||||
ServeFile(&ctx, "fasthttputil")
|
||||
if ctx.Response.StatusCode() != StatusFound {
|
||||
t.Fatalf("Unexpected status code %d for directory '/.git' without trailing slash. Expecting %d.", ctx.Response.StatusCode(), StatusFound)
|
||||
t.Fatalf("Unexpected status code %d for directory '/fasthttputil' without trailing slash. Expecting %d.", ctx.Response.StatusCode(), StatusFound)
|
||||
}
|
||||
|
||||
ctx.Request.Reset()
|
||||
ctx.Response.Reset()
|
||||
ServeFile(&ctx, ".git/")
|
||||
ServeFile(&ctx, "fasthttputil/")
|
||||
if ctx.Response.StatusCode() != StatusOK {
|
||||
t.Fatalf("Unexpected status code %d for directory '/.git/' with trailing slash. Expecting %d.", ctx.Response.StatusCode(), StatusOK)
|
||||
t.Fatalf("Unexpected status code %d for directory '/fasthttputil/' with trailing slash. Expecting %d.", ctx.Response.StatusCode(), StatusOK)
|
||||
}
|
||||
|
||||
ctx.Request.Reset()
|
||||
|
||||
Reference in New Issue
Block a user