aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-11-20 18:38:24 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2017-11-20 18:38:24 +0100
commit1e48a8654c9ebd9c478404bc63a979b2b6f88864 (patch)
treecf89a70d826add6206ba41562cb11fa40bd7a2a9 /plumbing/transport
parenta364785ba63465eb61bed35ded7794c05a884517 (diff)
downloadgo-git-1e48a8654c9ebd9c478404bc63a979b2b6f88864.tar.gz
transport: git and http, full mocked tests
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Diffstat (limited to 'plumbing/transport')
-rw-r--r--plumbing/transport/git/common_test.go8
-rw-r--r--plumbing/transport/git/receive_pack_test.go7
2 files changed, 7 insertions, 8 deletions
diff --git a/plumbing/transport/git/common_test.go b/plumbing/transport/git/common_test.go
index 7de41cb..9f54fdc 100644
--- a/plumbing/transport/git/common_test.go
+++ b/plumbing/transport/git/common_test.go
@@ -7,6 +7,7 @@ import (
"os"
"os/exec"
"path/filepath"
+ "runtime"
"testing"
"time"
@@ -26,6 +27,11 @@ type BaseSuite struct {
}
func (s *BaseSuite) SetUpTest(c *C) {
+ if runtime.GOOS == "windows" {
+ c.Skip(`git for windows has issues with write operations through git:// protocol.
+ See https://github.com/git-for-windows/git/issues/907`)
+ }
+
var err error
s.port, err = freePort()
c.Assert(err, IsNil)
@@ -79,7 +85,7 @@ func (s *BaseSuite) prepareRepository(c *C, f *fixtures.Fixture, name string) tr
}
func (s *BaseSuite) TearDownTest(c *C) {
- _ = s.daemon.Process.Signal(os.Interrupt)
+ _ = s.daemon.Process.Signal(os.Kill)
_ = s.daemon.Wait()
err := os.RemoveAll(s.base)
diff --git a/plumbing/transport/git/receive_pack_test.go b/plumbing/transport/git/receive_pack_test.go
index c63d706..7973dc0 100644
--- a/plumbing/transport/git/receive_pack_test.go
+++ b/plumbing/transport/git/receive_pack_test.go
@@ -1,8 +1,6 @@
package git
import (
- "runtime"
-
"github.com/src-d/go-git-fixtures"
"gopkg.in/src-d/go-git.v4/plumbing/transport/test"
@@ -17,11 +15,6 @@ type ReceivePackSuite struct {
var _ = Suite(&ReceivePackSuite{})
func (s *ReceivePackSuite) SetUpTest(c *C) {
- if runtime.GOOS == "windows" {
- c.Skip(`git for windows has issues with write operations through git:// protocol.
- See https://github.com/git-for-windows/git/issues/907`)
- }
-
s.BaseSuite.SetUpTest(c)
s.ReceivePackSuite.Client = DefaultClient