forked from forgejo/forgejo
Fix Benchmark tests, remove a broken one & add two new (#15250)
* Benchmark Integration TESTS * CI: add benching-arm64 pipeline * BenchmarkRepo: name test case tests * Fix BenchmarkRepoBranchCommit beside Create new Branch * CI: benching use amd64 * rm total broken "BenchmarkRepo" * dont run benchmark in CI
This commit is contained in:
parent
c29e85228f
commit
a67861b4dc
6 changed files with 100 additions and 99 deletions
|
@ -76,7 +76,7 @@ func allowLFSFilters() []string {
|
|||
return filteredLFSGlobalArgs[:j]
|
||||
}
|
||||
|
||||
func onGiteaRun(t *testing.T, callback func(*testing.T, *url.URL), prepare ...bool) {
|
||||
func onGiteaRunTB(t testing.TB, callback func(testing.TB, *url.URL), prepare ...bool) {
|
||||
if len(prepare) == 0 || prepare[0] {
|
||||
defer prepareTestEnv(t, 1)()
|
||||
}
|
||||
|
@ -108,6 +108,12 @@ func onGiteaRun(t *testing.T, callback func(*testing.T, *url.URL), prepare ...bo
|
|||
callback(t, u)
|
||||
}
|
||||
|
||||
func onGiteaRun(t *testing.T, callback func(*testing.T, *url.URL), prepare ...bool) {
|
||||
onGiteaRunTB(t, func(t testing.TB, u *url.URL) {
|
||||
callback(t.(*testing.T), u)
|
||||
}, prepare...)
|
||||
}
|
||||
|
||||
func doGitClone(dstLocalPath string, u *url.URL) func(*testing.T) {
|
||||
return func(t *testing.T) {
|
||||
assert.NoError(t, git.CloneWithArgs(context.Background(), u.String(), dstLocalPath, allowLFSFilters(), git.CloneRepoOptions{}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue