mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 22:06:57 +00:00
fix test
This commit is contained in:
parent
dba083ac9c
commit
f5b3e2ccb0
1 changed files with 18 additions and 17 deletions
|
@ -23,6 +23,7 @@ func TestHandlerPerformance(t *testing.T) {
|
||||||
)
|
)
|
||||||
|
|
||||||
testCase := func(uri string, status int) {
|
testCase := func(uri string, status int) {
|
||||||
|
t.Run(uri, func(t *testing.T) {
|
||||||
req := httptest.NewRequest("GET", uri, nil)
|
req := httptest.NewRequest("GET", uri, nil)
|
||||||
w := httptest.NewRecorder()
|
w := httptest.NewRecorder()
|
||||||
|
|
||||||
|
@ -39,10 +40,10 @@ func TestHandlerPerformance(t *testing.T) {
|
||||||
} else {
|
} else {
|
||||||
t.Logf("request took %d milliseconds", end.Sub(start).Milliseconds())
|
t.Logf("request took %d milliseconds", end.Sub(start).Milliseconds())
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
testCase("https://mondstern.codeberg.page/", 424) // TODO: expect 200
|
testCase("https://mondstern.codeberg.page/", 404) // TODO: expect 200
|
||||||
testCase("https://mondstern.codeberg.page/", 424) // TODO: expect 200
|
testCase("https://codeberg.page/", 404) // TODO: expect 200
|
||||||
testCase("https://example.momar.xyz/", 424) // TODO: expect 200
|
testCase("https://example.momar.xyz/", 424)
|
||||||
testCase("https://codeberg.page/", 424) // TODO: expect 200
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue