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:
authorJacob Vosmaer <jacob@gitlab.com>2018-10-16 12:13:45 +0300
committerJacob Vosmaer <jacob@gitlab.com>2018-10-16 12:13:45 +0300
commitcdae685e86a4a6ae90916ca1bf17f8c5c099c7ec (patch)
treecaed7d415ebab11c9e241187bb6dbe998a04ef90
parenta3b8176778d7c0525d9131d51c7c2bef190a7ff7 (diff)
parent67074d23b16a3d306cfa8b95e453cb494e6383d6 (diff)
Merge branch 'test-fixes' into 'master'
Skip lfs smudge for alternate object directoy tests Closes #1360 See merge request gitlab-org/gitaly!916
-rw-r--r--internal/service/blob/lfs_pointers_test.go2
-rw-r--r--internal/testhelper/commit.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/internal/service/blob/lfs_pointers_test.go b/internal/service/blob/lfs_pointers_test.go
index bdf1d4134..3dedf32af 100644
--- a/internal/service/blob/lfs_pointers_test.go
+++ b/internal/service/blob/lfs_pointers_test.go
@@ -137,6 +137,8 @@ func TestSuccessfulGetNewLFSPointersRequest(t *testing.T) {
commiterArgs := []string{"-c", "user.name=Scrooge McDuck", "-c", "user.email=scrooge@mcduck.com"}
cmdArgs := append(commiterArgs, "-C", testRepoPath, "cherry-pick", string(revision))
cmd := exec.Command("git", cmdArgs...)
+ // Skip smudge since it doesn't work with file:// remotes and we don't need it
+ cmd.Env = append(cmd.Env, "GIT_LFS_SKIP_SMUDGE=1")
altDirsCommit, altDirs := testhelper.CreateCommitInAlternateObjectDirectory(t, testRepoPath, cmd)
// Create a commit not pointed at by any ref to emulate being in the
diff --git a/internal/testhelper/commit.go b/internal/testhelper/commit.go
index 5cd6a3806..eb139438d 100644
--- a/internal/testhelper/commit.go
+++ b/internal/testhelper/commit.go
@@ -73,7 +73,7 @@ func CreateCommitInAlternateObjectDirectory(t *testing.T, repoPath string, cmd *
// Because we set 'gitObjectEnv', the new objects created by this command
// will go into 'find-commits-alt-test-repo/.git/alt-objects'.
- cmd.Env = gitObjectEnv
+ cmd.Env = append(cmd.Env, gitObjectEnv...)
if output, err := cmd.Output(); err != nil {
stderr := err.(*exec.ExitError).Stderr
t.Fatalf("stdout: %s, stderr: %s", output, stderr)