1
0
Fork 0
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:
6543 2021-04-16 20:30:16 +02:00 committed by GitHub
parent c29e85228f
commit a67861b4dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 100 additions and 99 deletions

View file

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