From 01ea726be6ed745a21c88fd61fc5e2a62c4ceb88 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Wed, 7 Dec 2016 11:16:59 +0100 Subject: remote: sideband support (#164) * remote: sideband support * changes --- repository_test.go | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'repository_test.go') diff --git a/repository_test.go b/repository_test.go index adc722c..0b6a603 100644 --- a/repository_test.go +++ b/repository_test.go @@ -1,7 +1,9 @@ package git import ( + "bytes" "fmt" + "os" "os/exec" "path/filepath" "strings" @@ -11,10 +13,6 @@ import ( "gopkg.in/src-d/go-git.v4/plumbing" "gopkg.in/src-d/go-git.v4/storage/memory" - "os" - - "bytes" - . "gopkg.in/check.v1" ) @@ -45,6 +43,21 @@ func (s *RepositorySuite) TestCreateRemoteAndRemote(c *C) { c.Assert(alt.Config().Name, Equals, "foo") } +func (s *RepositorySuite) TestRemoteWithProgress(c *C) { + buf := bytes.NewBuffer(nil) + + r := NewMemoryRepository() + r.Progress = buf + + remote, err := r.CreateRemote(&config.RemoteConfig{ + Name: "foo", + URL: "http://foo/foo.git", + }) + + c.Assert(err, IsNil) + c.Assert(remote.p, Equals, buf) +} + func (s *RepositorySuite) TestCreateRemoteInvalid(c *C) { r := NewMemoryRepository() remote, err := r.CreateRemote(&config.RemoteConfig{}) -- cgit