Skip to content

Commit 9d72861

Browse files
committed
fix test code
1 parent e76ccbe commit 9d72861

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

integrations/integration_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ func initIntegrationTest() {
165165

166166
setting.SetCustomPathAndConf("", "", "")
167167
setting.LoadForTest()
168+
setting.Repository.DefaultBranch = "master" // many test code still assume that default branch is called "master"
168169
_ = util.RemoveAll(models.LocalCopyPath())
169170
git.CheckLFSVersion()
170171
setting.InitDBConfig()

models/unittest/testdb.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ func MainTest(m *testing.M, pathToGiteaRoot string, fixtureFiles ...string) {
6969
setting.SSH.Port = 3000
7070
setting.SSH.Domain = "try.gitea.io"
7171
setting.Database.UseSQLite3 = true
72+
setting.Repository.DefaultBranch = "master" // many test code still assume that default branch is called "master"
7273
repoRootPath, err := os.MkdirTemp(os.TempDir(), "repos")
7374
if err != nil {
7475
fatalTestError("TempDir: %v\n", err)

0 commit comments

Comments
 (0)