1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Refactor env var related code (#33075)

And add more comments
This commit is contained in:
wxiaoguang
2025-01-02 11:36:50 +08:00
committed by GitHub
parent 2852708fdf
commit 4f386e2c5e
5 changed files with 32 additions and 52 deletions

View File

@@ -40,13 +40,6 @@ func TestMain(m *testing.M) {
tests.InitTest(false)
testE2eWebRoutes = routers.NormalRoutes()
os.Unsetenv("GIT_AUTHOR_NAME")
os.Unsetenv("GIT_AUTHOR_EMAIL")
os.Unsetenv("GIT_AUTHOR_DATE")
os.Unsetenv("GIT_COMMITTER_NAME")
os.Unsetenv("GIT_COMMITTER_EMAIL")
os.Unsetenv("GIT_COMMITTER_DATE")
err := unittest.InitFixtures(
unittest.FixturesOptions{
Dir: filepath.Join(filepath.Dir(setting.AppPath), "models/fixtures/"),