Use "main" as default branch name (#19354)

* Use "main" as default branch name

* fix test code
This commit is contained in:
wxiaoguang 2022-04-09 12:26:48 +08:00 committed by GitHub
parent 1dfa26e00e
commit d906858847
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 3 deletions

View file

@ -69,6 +69,7 @@ func MainTest(m *testing.M, pathToGiteaRoot string, fixtureFiles ...string) {
setting.SSH.Port = 3000
setting.SSH.Domain = "try.gitea.io"
setting.Database.UseSQLite3 = true
setting.Repository.DefaultBranch = "master" // many test code still assume that default branch is called "master"
repoRootPath, err := os.MkdirTemp(os.TempDir(), "repos")
if err != nil {
fatalTestError("TempDir: %v\n", err)