From 9e34f68d980de57631c588aaa910c9ea95ed7c2e Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Fri, 25 Nov 2016 09:25:49 +0100 Subject: plumbing/transport: add common tests and fixes. (#136) * plumbing/transport: add common tests and fixes. * add common test suite for different transport implementations. * fix different behaviour on error handling for ssh and http. fixes issue #123. * support detecting unexisting repositories with SSH + GitHub/Bitbucket (apparently, there is no standard for all SSH servers). * remove ssh.NewClient (only DefaultClient makes sense at the moment). * make ssh.Client and http.Client private. * utils/ioutil: utilities to work with io interfaces. * * transport: test actual objects fetched, not just packfile size. * * fix doc typo. * * improve UploadPackRequest.IsEmpty --- plumbing/transport/client/client_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plumbing/transport/client') diff --git a/plumbing/transport/client/client_test.go b/plumbing/transport/client/client_test.go index 90bad57..0f4b2e5 100644 --- a/plumbing/transport/client/client_test.go +++ b/plumbing/transport/client/client_test.go @@ -22,14 +22,14 @@ func (s *ClientSuite) TestNewClientHTTP(c *C) { output, err := NewClient(e) c.Assert(err, IsNil) - c.Assert(typeAsString(output), Equals, "*http.Client") + c.Assert(typeAsString(output), Equals, "*http.client") e, err = transport.NewEndpoint("https://github.com/src-d/go-git") c.Assert(err, IsNil) output, err = NewClient(e) c.Assert(err, IsNil) - c.Assert(typeAsString(output), Equals, "*http.Client") + c.Assert(typeAsString(output), Equals, "*http.client") } func (s *ClientSuite) TestNewClientSSH(c *C) { @@ -38,7 +38,7 @@ func (s *ClientSuite) TestNewClientSSH(c *C) { output, err := NewClient(e) c.Assert(err, IsNil) - c.Assert(typeAsString(output), Equals, "*ssh.Client") + c.Assert(typeAsString(output), Equals, "*ssh.client") } func (s *ClientSuite) TestNewClientUnknown(c *C) { -- cgit