summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstk <stk@ableton.com>2023-02-07 11:45:47 +0100
committerstk <stk@ableton.com>2023-02-07 17:26:45 +0100
commitb243f30f48e78d9124b4734531b4003d45f1a0f2 (patch)
tree4c335cd38b9737a5885f3de1fc82d5601315f441
parent469938ee9b91601313ec493409400fc17155b12d (diff)
Disable ~/.gitconfig when running integration tests
A global ~/.gitconfig file can have influence on how integration tests behave; in my case, I had the option "merge.conflictStyle" set to "diff3", which made the integration test "cherry_pick_conflict" fail because the diff was different from what the test expected. Make this more robust by telling git to ignore the global config file when running tests.
-rw-r--r--pkg/integration/components/runner.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/integration/components/runner.go b/pkg/integration/components/runner.go
index 964ad98a5..2b05d102e 100644
--- a/pkg/integration/components/runner.go
+++ b/pkg/integration/components/runner.go
@@ -165,6 +165,8 @@ func getLazygitCommand(test *IntegrationTest, paths Paths, rootDir string, sandb
cmdObj.AddEnvVars(fmt.Sprintf("KEY_PRESS_DELAY=%d", keyPressDelay))
}
+ cmdObj.AddEnvVars("GIT_CONFIG_GLOBAL=/dev/null")
+
return cmdObj.GetCmd(), nil
}