This commit is contained in:
6543 2022-11-22 21:56:40 +01:00
parent dba083ac9c
commit f5b3e2ccb0
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE

View file

@ -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
} }