diff options
author | John Cai <jcai@gitlab.com> | 2023-04-28 17:46:11 +0300 |
---|---|---|
committer | John Cai <jcai@gitlab.com> | 2023-04-28 17:46:11 +0300 |
commit | 21f31e9a3241d6d8c9fbaea2116d00f2af7e9366 (patch) | |
tree | 5df6d6dc94ad071abb3ba7cc3b14bef38e9eac68 | |
parent | 1beba04313c69bf60d965301960babb95b090659 (diff) |
blob: Add test to show revision and path can be used
The ListBlobs RPC can be passed a revision and path in the form of
revision:path, since git-cat-file(1) used under the hood recognizes this
format. Add a test to show this.
-rw-r--r-- | internal/gitaly/service/blob/blobs_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/gitaly/service/blob/blobs_test.go b/internal/gitaly/service/blob/blobs_test.go index d256114be..a29babeea 100644 --- a/internal/gitaly/service/blob/blobs_test.go +++ b/internal/gitaly/service/blob/blobs_test.go @@ -83,6 +83,15 @@ func TestListBlobs(t *testing.T) { }, }, { + desc: "revision and path", + revisions: []string{ + "master:a", + }, + expectedBlobs: []*gitalypb.ListBlobsResponse_Blob{ + {Oid: blobAOID.String(), Size: blobASize}, + }, + }, + { desc: "single blob with paths", revisions: []string{ repoInfo.lfsPointers[0].Oid, |