From 78e998126386e9a7c4acba0fd8d3f9b0099a97ce Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Thu, 23 Jan 2020 17:49:19 +0100 Subject: Remove unused TEST_REPO_STORAGE_PATH env var --- Makefile | 1 - _support/makegen.go | 7 +------ internal/testhelper/testhelper.go | 11 ----------- 3 files changed, 1 insertion(+), 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") -- cgit v1.2.3