Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Cai <jcai@gitlab.com>2020-01-24 01:26:43 +0300
committerJohn Cai <jcai@gitlab.com>2020-01-24 01:26:43 +0300
commitc283c088ff681c9008d0e921bfa3d8bc9dc46bf5 (patch)
tree1b6d390a29108413dacc74b840967c0282aa3cc4
parent6367f17d86852fbd72ced496bf0a44f1ef722366 (diff)
parent78e998126386e9a7c4acba0fd8d3f9b0099a97ce (diff)
Merge branch 'jv-remove-test-repo-env-var' into 'master'
Remove unused TEST_REPO_STORAGE_PATH env var See merge request gitlab-org/gitaly!1780
-rw-r--r--Makefile1
-rw-r--r--_support/makegen.go7
-rw-r--r--internal/testhelper/testhelper.go11
3 files changed, 1 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 89b8a5c8a..4c25507b8 100644
--- a/Makefile
+++ b/Makefile
@@ -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")