diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2020-01-23 19:49:19 +0300 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2020-01-23 19:49:19 +0300 |
commit | 78e998126386e9a7c4acba0fd8d3f9b0099a97ce (patch) | |
tree | b66b2ddb697b5d1e711397f7e3ccef82eb82ca98 | |
parent | a74fe57e74782d0bb306ba3d36a41ee25d43d324 (diff) |
Remove unused TEST_REPO_STORAGE_PATH env var
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | _support/makegen.go | 7 | ||||
-rw-r--r-- | internal/testhelper/testhelper.go | 11 |
3 files changed, 1 insertions, 18 deletions
@@ -14,7 +14,6 @@ MAKEGEN = $(BUILD_DIR)/makegen # These variables are handed down to make in _build export PATH := $(BUILD_DIR)/bin:$(PATH) -export TEST_REPO_STORAGE_PATH := $(CURDIR)/internal/testhelper/testdata/data export SOURCE_DIR := $(CURDIR) export GO111MODULE = on diff --git a/_support/makegen.go b/_support/makegen.go index bb2c92cd8..6845d76d2 100644 --- a/_support/makegen.go +++ b/_support/makegen.go @@ -113,12 +113,7 @@ func (gm *gitalyMake) SourceDir() string { } func (gm *gitalyMake) TestRepoStoragePath() string { - path := os.Getenv("TEST_REPO_STORAGE_PATH") - if len(path) == 0 { - log.Fatal("TEST_REPO_STORAGE_PATH is not set") - } - - return path + return filepath.Join(gm.SourceDir(), "internal/testhelper/testdata/data") } func (gm *gitalyMake) TestRepo() string { diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go index 805aa0a5f..7f1a24752 100644 --- a/internal/testhelper/testhelper.go +++ b/internal/testhelper/testhelper.go @@ -94,17 +94,6 @@ func MustReadFile(t *testing.T, filename string) []byte { // GitlabTestStoragePath returns the storage path to the gitlab-test repo. func GitlabTestStoragePath() string { - // If TEST_REPO_STORAGE_PATH has been set (by the Makefile) then use that - testRepoPath := os.Getenv("TEST_REPO_STORAGE_PATH") - if testRepoPath != "" { - testRepoPathAbs, err := filepath.Abs(testRepoPath) - if err != nil { - log.Fatal(err) - } - - return testRepoPathAbs - } - _, currentFile, _, ok := runtime.Caller(0) if !ok { log.Fatal("Could not get caller info") |