diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-11-29 15:11:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-29 15:11:00 +0100 |
commit | ef1a0579fbc6aac510313ce073d1dd8fc8a9202b (patch) | |
tree | 6d41484c70cef0ec6b7582e2ac15b9daccf0e54e /plumbing/transport/test | |
parent | 47007c70c5a696472576a522cd0e265a777f97a8 (diff) | |
download | go-git-ef1a0579fbc6aac510313ce073d1dd8fc8a9202b.tar.gz |
protocol/packp: capabilities new Capability entity and List struct, test improvements (#144)
* protocol/pakp: capabilities new Capability entity and List struct, test improvements
* etc: example cloud-config file
* removing sorting from List.String
Diffstat (limited to 'plumbing/transport/test')
-rw-r--r-- | plumbing/transport/test/common.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plumbing/transport/test/common.go b/plumbing/transport/test/common.go index 7818fbb..ed2e141 100644 --- a/plumbing/transport/test/common.go +++ b/plumbing/transport/test/common.go @@ -15,6 +15,7 @@ import ( "gopkg.in/src-d/go-git.v4/storage/memory" . "gopkg.in/check.v1" + "gopkg.in/src-d/go-git.v4/plumbing/protocol/packp/capability" ) type FetchPackSuite struct { @@ -64,7 +65,9 @@ func (s *FetchPackSuite) TestDefaultBranch(c *C) { info, err := r.AdvertisedReferences() c.Assert(err, IsNil) - c.Assert(info.Capabilities.SymbolicReference("HEAD"), Equals, "refs/heads/master") + symrefs := info.Capabilities.Get(capability.SymRef) + c.Assert(symrefs, HasLen, 1) + c.Assert(symrefs[0], Equals, "HEAD:refs/heads/master") } func (s *FetchPackSuite) TestCapabilities(c *C) { @@ -74,7 +77,7 @@ func (s *FetchPackSuite) TestCapabilities(c *C) { info, err := r.AdvertisedReferences() c.Assert(err, IsNil) - c.Assert(info.Capabilities.Get("agent").Values, HasLen, 1) + c.Assert(info.Capabilities.Get(capability.Agent), HasLen, 1) } func (s *FetchPackSuite) TestFullFetchPack(c *C) { |