diff options
Diffstat (limited to 'workhorse/internal/upstream/routes_test.go')
-rw-r--r-- | workhorse/internal/upstream/routes_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/workhorse/internal/upstream/routes_test.go b/workhorse/internal/upstream/routes_test.go index 13c000bf791..09551b7f605 100644 --- a/workhorse/internal/upstream/routes_test.go +++ b/workhorse/internal/upstream/routes_test.go @@ -1,6 +1,7 @@ package upstream import ( + "bytes" "testing" "gitlab.com/gitlab-org/gitlab/workhorse/internal/testhelper" @@ -86,3 +87,13 @@ func TestAssetsServedLocallyWithGeoProxy(t *testing.T) { runTestCasesWithGeoProxyEnabled(t, testCases) } + +func TestLfsBatchSecondaryGitSSHPullWithGeoProxy(t *testing.T) { + body := bytes.NewBuffer([]byte(`{"operation":"download","objects": [{"oid":"fakeoid", "size":10}], "transfers":["basic", "ssh","lfs-standalone-file"],"ref":{"name":"refs/heads/fakeref"},"hash_algo":"sha256"}`)) + contentType := "application/vnd.git-lfs+json; charset=utf-8" + testCases := []testCasePost{ + {testCase{"GitLab Shell call to /group/project.git/info/lfs/objects/batch", "/group/project.git/info/lfs/objects/batch", "Local Rails server received request to path /group/project.git/info/lfs/objects/batch"}, contentType, body}, + } + + runTestCasesWithGeoProxyEnabledPost(t, testCases) +} |