Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1868 from sigma/pr/fix-rebase-exec
Browse files Browse the repository at this point in the history
test: unset GIT_DIR for git operations in integration tests
  • Loading branch information
sdboyer authored Jul 3, 2018
2 parents f26ae76 + afa687f commit a437df4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/test/integration/testproj.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ type TestProject struct {

// NewTestProject initializes a new test's project directory.
func NewTestProject(t *testing.T, initPath, wd string, run RunFunc) *TestProject {
// Cleaning up the GIT_DIR variable is useful when running tests under git
// rebase. In any case, since we're operating with temporary clones,
// no pre-existing value could be useful here.
// We do it globally because the internal runs don't actually use the
// TestProject's environment.
os.Unsetenv("GIT_DIR")

new := &TestProject{
t: t,
origWd: wd,
Expand Down

0 comments on commit a437df4

Please sign in to comment.