aboutsummaryrefslogtreecommitdiffstats
path: root/repository_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-12-07 11:16:59 +0100
committerGitHub <noreply@github.com>2016-12-07 11:16:59 +0100
commit01ea726be6ed745a21c88fd61fc5e2a62c4ceb88 (patch)
tree8e0cbfe502afb3187d93e8da95cc1677794c6df5 /repository_test.go
parent5990aeb7198a4961a363eeb422a3faa57c8dc029 (diff)
downloadgo-git-01ea726be6ed745a21c88fd61fc5e2a62c4ceb88.tar.gz
remote: sideband support (#164)
* remote: sideband support * changes
Diffstat (limited to 'repository_test.go')
-rw-r--r--repository_test.go21
1 files changed, 17 insertions, 4 deletions
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{})