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
|
@ -10,11 +10,11 @@ import (
|
|||
api "code.gitea.io/gitea/modules/structs"
|
||||
)
|
||||
|
||||
func createFileInBranch(user *models.User, repo *models.Repository, treePath, branchName string) (*api.FileResponse, error) {
|
||||
func createFileInBranch(user *models.User, repo *models.Repository, treePath, branchName, content string) (*api.FileResponse, error) {
|
||||
opts := &repofiles.UpdateRepoFileOptions{
|
||||
OldBranch: branchName,
|
||||
TreePath: treePath,
|
||||
Content: "This is a NEW file",
|
||||
Content: content,
|
||||
IsNewFile: true,
|
||||
Author: nil,
|
||||
Committer: nil,
|
||||
|
@ -23,5 +23,5 @@ func createFileInBranch(user *models.User, repo *models.Repository, treePath, br
|
|||
}
|
||||
|
||||
func createFile(user *models.User, repo *models.Repository, treePath string) (*api.FileResponse, error) {
|
||||
return createFileInBranch(user, repo, treePath, repo.DefaultBranch)
|
||||
return createFileInBranch(user, repo, treePath, repo.DefaultBranch, "This is a NEW file")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue