Skip to content

Commit

Permalink
fix test code
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Apr 9, 2022
1 parent e76ccbe commit 9d72861
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions integrations/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ func initIntegrationTest() {

setting.SetCustomPathAndConf("", "", "")
setting.LoadForTest()
setting.Repository.DefaultBranch = "master" // many test code still assume that default branch is called "master"
_ = util.RemoveAll(models.LocalCopyPath())
git.CheckLFSVersion()
setting.InitDBConfig()
Expand Down
1 change: 1 addition & 0 deletions models/unittest/testdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9d72861

Please sign in to comment.