Skip to content

Commit 9cc93c0

Browse files
Unset git author/committer variables when running integration tests (go-gitea#19512) (go-gitea#19519)
TestAPIGitTag (and likely others) will fail if the running environment contains GIT_AUTHOR_NAME and other env variables like it. This PR simply unsets these when running the integration tests. Fix go-gitea#14247 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: zeripath <[email protected]>
1 parent b31418e commit 9cc93c0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

integrations/integration_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ func TestMain(m *testing.M) {
112112
}
113113
}
114114

115+
os.Unsetenv("GIT_AUTHOR_NAME")
116+
os.Unsetenv("GIT_AUTHOR_EMAIL")
117+
os.Unsetenv("GIT_AUTHOR_DATE")
118+
os.Unsetenv("GIT_COMMITTER_NAME")
119+
os.Unsetenv("GIT_COMMITTER_EMAIL")
120+
os.Unsetenv("GIT_COMMITTER_DATE")
121+
115122
err := unittest.InitFixtures(
116123
unittest.FixturesOptions{
117124
Dir: filepath.Join(filepath.Dir(setting.AppPath), "models/fixtures/"),

0 commit comments

Comments
 (0)