зеркало из https://github.com/golang/dep.git
Merge pull request #1868 from sigma/pr/fix-rebase-exec
test: unset GIT_DIR for git operations in integration tests
This commit is contained in:
Коммит
a437df46ab
|
@ -42,6 +42,13 @@ type TestProject struct {
|
||||||
|
|
||||||
// NewTestProject initializes a new test's project directory.
|
// NewTestProject initializes a new test's project directory.
|
||||||
func NewTestProject(t *testing.T, initPath, wd string, run RunFunc) *TestProject {
|
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{
|
new := &TestProject{
|
||||||
t: t,
|
t: t,
|
||||||
origWd: wd,
|
origWd: wd,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче