diff options
author | Stan Hu <stanhu@gmail.com> | 2020-09-14 09:02:44 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2020-09-15 18:50:55 +0300 |
commit | 3cef6ba80866e1c5367d86d8f29fb1e87eb96a08 (patch) | |
tree | c9ac7c350c6da25c559208694af427dee353a634 /internal/testhelper | |
parent | 4805333598f9ed608652cfd28650cabf110fc646 (diff) |
Export GL_REPOSITORY and GL_PROJECT_PATH in `git archive` call
To support bundling Git LFS objects within a `git archive` call, we will
need a custom LFS smudge filter that will download the LFS data. To do
this, we will need to make an API call request to check the the
requested LFS object ID actually belongs to the LFS object network, so
we need to export `GL_REPOSITORY` to the environment. `GL_PROJECT_PATH`
may be useful for debugging purposes.
Diffstat (limited to 'internal/testhelper')
-rw-r--r-- | internal/testhelper/testhelper.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go index fd0b23387..971963aa0 100644 --- a/internal/testhelper/testhelper.go +++ b/internal/testhelper/testhelper.go @@ -57,6 +57,7 @@ const ( testGitEnv = "testdata/git-env" GlRepository = "project-1" GlID = "user-123" + GlProjectPath = "gitlab-org/gitlab-test" ) var configureOnce sync.Once @@ -501,9 +502,10 @@ func Context(opts ...ContextOpt) (context.Context, func()) { func CreateRepo(t testing.TB, storagePath, relativePath string) *gitalypb.Repository { require.NoError(t, os.MkdirAll(filepath.Dir(storagePath), 0755), "making repo parent dir") return &gitalypb.Repository{ - StorageName: "default", - RelativePath: relativePath, - GlRepository: GlRepository, + StorageName: "default", + RelativePath: relativePath, + GlRepository: GlRepository, + GlProjectPath: GlProjectPath, } } |