diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-13 20:07:21 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-13 20:07:21 +0200 |
commit | a65bcbc63bef24cf219c63d1b8cfb309c95d1c0f (patch) | |
tree | 973644feaf08adc916dab8fb95d1f6c86194c9c1 /clients/common/common_test.go | |
parent | a6ea9e8dd2eda48c8405f609e0fb444d3717af53 (diff) | |
download | go-git-a65bcbc63bef24cf219c63d1b8cfb309c95d1c0f.tar.gz |
clients: new Endpoint implementation and InstallProtocol function
Diffstat (limited to 'clients/common/common_test.go')
-rw-r--r-- | clients/common/common_test.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/clients/common/common_test.go b/clients/common/common_test.go index 5be6eba..80934fc 100644 --- a/clients/common/common_test.go +++ b/clients/common/common_test.go @@ -17,20 +17,15 @@ type SuiteCommon struct{} var _ = Suite(&SuiteCommon{}) func (s *SuiteCommon) TestNewEndpoint(c *C) { - e, err := NewEndpoint("git@github.com:user/repository.git") + e, err := NewEndpoint("ssh://git@github.com/user/repository.git") c.Assert(err, IsNil) - c.Assert(e, Equals, Endpoint("https://github.com/user/repository.git")) + c.Assert(e.String(), Equals, "ssh://git@github.com/user/repository.git") } func (s *SuiteCommon) TestNewEndpointWrongForgat(c *C) { e, err := NewEndpoint("foo") c.Assert(err, Not(IsNil)) - c.Assert(e, Equals, Endpoint("")) -} - -func (s *SuiteCommon) TestEndpointService(c *C) { - e, _ := NewEndpoint("git@github.com:user/repository.git") - c.Assert(e.Service("foo"), Equals, "https://github.com/user/repository.git/info/refs?service=foo") + c.Assert(e.Host, Equals, "") } const CapabilitiesFixture = "6ecf0ef2c2dffb796033e5a02219af86ec6584e5 HEADmulti_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed no-done symref=HEAD:refs/heads/master agent=git/2:2.4.8~dbussink-fix-enterprise-tokens-compilation-1167-gc7006cf" |