1
0
Fork 0
forked from forgejo/forgejo

Refactor tests (#26464)

1. Give the global variable clear names
2. Use generic parameter for `onGiteaRun`
This commit is contained in:
wxiaoguang 2023-08-13 00:30:16 +08:00 committed by GitHub
parent bcccf4c0d6
commit c28e29fd94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 65 additions and 127 deletions

View file

@ -24,9 +24,7 @@ func StringWithCharset(length int, charset string) string {
}
func BenchmarkRepoBranchCommit(b *testing.B) {
onGiteaRunTB(b, func(t testing.TB, u *url.URL) {
b := t.(*testing.B)
onGiteaRun(b, func(b *testing.B, u *url.URL) {
samples := []int64{1, 2, 3}
b.ResetTimer()