aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/protocol/packp/ulreq_encode_test.go
diff options
context:
space:
mode:
authorNikolay Edigaryev <edigaryev@gmail.com>2024-04-12 02:01:46 +0400
committerGitHub <noreply@github.com>2024-04-11 23:01:46 +0100
commit89cce891887e85b7b1bc43958f24c558d637143f (patch)
tree842a100861d1ec787a02a047e49d9794a3e66232 /plumbing/protocol/packp/ulreq_encode_test.go
parent7d3984315fa46391f174f291b81d2ce2fd7d4ed4 (diff)
downloadgo-git-89cce891887e85b7b1bc43958f24c558d637143f.tar.gz
plumbing: protocol/packp, client-side filter capability support (#1000)
* plumbing: protocol/packp, client-side filter capability support
Diffstat (limited to 'plumbing/protocol/packp/ulreq_encode_test.go')
-rw-r--r--plumbing/protocol/packp/ulreq_encode_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/plumbing/protocol/packp/ulreq_encode_test.go b/plumbing/protocol/packp/ulreq_encode_test.go
index ba6df1a..247de27 100644
--- a/plumbing/protocol/packp/ulreq_encode_test.go
+++ b/plumbing/protocol/packp/ulreq_encode_test.go
@@ -273,6 +273,20 @@ func (s *UlReqEncodeSuite) TestDepthReference(c *C) {
testUlReqEncode(c, ur, expected)
}
+func (s *UlReqEncodeSuite) TestFilter(c *C) {
+ ur := NewUploadRequest()
+ ur.Wants = append(ur.Wants, plumbing.NewHash("1111111111111111111111111111111111111111"))
+ ur.Filter = FilterTreeDepth(0)
+
+ expected := []string{
+ "want 1111111111111111111111111111111111111111\n",
+ "filter tree:0\n",
+ pktline.FlushString,
+ }
+
+ testUlReqEncode(c, ur, expected)
+}
+
func (s *UlReqEncodeSuite) TestAll(c *C) {
ur := NewUploadRequest()
ur.Wants = append(ur.Wants,