From 9cc93c05cd047efb7b70a3cbae99adeee3b8bab6 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Tue, 26 Apr 2022 19:23:54 -0400 Subject: [PATCH] Unset git author/committer variables when running integration tests (#19512) (#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 #14247 Signed-off-by: Andrew Thornton Co-authored-by: zeripath --- integrations/integration_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/integrations/integration_test.go b/integrations/integration_test.go index 527d4b951a..924a96ce1c 100644 --- a/integrations/integration_test.go +++ b/integrations/integration_test.go @@ -112,6 +112,13 @@ func TestMain(m *testing.M) { } } + 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/"),