Skip to content

Commit 6dd3637

Browse files
authored
Unset git author/committer variables when running integration tests (#19512)
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 #14247 Signed-off-by: Andrew Thornton <[email protected]>
1 parent 2347c9e commit 6dd3637

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)