aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing')
-rw-r--r--plumbing/transport/file/upload_pack_test.go3
-rw-r--r--plumbing/transport/server/server_test.go20
2 files changed, 9 insertions, 14 deletions
diff --git a/plumbing/transport/file/upload_pack_test.go b/plumbing/transport/file/upload_pack_test.go
index f013683..f953e02 100644
--- a/plumbing/transport/file/upload_pack_test.go
+++ b/plumbing/transport/file/upload_pack_test.go
@@ -74,6 +74,7 @@ func (s *UploadPackSuite) TestNonExistentCommand(c *C) {
cmd := "/non-existent-git"
client := NewClient(cmd, cmd)
session, err := client.NewUploadPackSession(s.Endpoint, s.EmptyAuth)
- c.Assert(err, ErrorMatches, ".*no such file or directory.*")
+ // Error message is OS-dependant, so do a broad check
+ c.Assert(err, ErrorMatches, ".*file.*")
c.Assert(session, IsNil)
}
diff --git a/plumbing/transport/server/server_test.go b/plumbing/transport/server/server_test.go
index 6a64674..5e7d234 100644
--- a/plumbing/transport/server/server_test.go
+++ b/plumbing/transport/server/server_test.go
@@ -1,7 +1,6 @@
package server_test
import (
- "fmt"
"testing"
"github.com/src-d/go-git-fixtures"
@@ -16,8 +15,6 @@ import (
func Test(t *testing.T) { TestingT(t) }
-const inprocScheme = "inproc"
-
type BaseSuite struct {
fixtures.Suite
loader server.MapLoader
@@ -29,15 +26,15 @@ func (s *BaseSuite) SetUpSuite(c *C) {
s.Suite.SetUpSuite(c)
s.loader = server.MapLoader{}
s.client = server.NewServer(s.loader)
- s.clientBackup = client.Protocols[inprocScheme]
- client.Protocols[inprocScheme] = s.client
+ s.clientBackup = client.Protocols["file"]
+ client.Protocols["file"] = s.client
}
func (s *BaseSuite) TearDownSuite(c *C) {
if s.clientBackup == nil {
- delete(client.Protocols, inprocScheme)
+ delete(client.Protocols, "file")
} else {
- client.Protocols[inprocScheme] = s.clientBackup
+ client.Protocols["file"] = s.clientBackup
}
}
@@ -47,8 +44,7 @@ func (s *BaseSuite) prepareRepositories(c *C, basic *transport.Endpoint,
f := fixtures.Basic().One()
fs := f.DotGit()
path := fs.Base()
- url := fmt.Sprintf("%s://%s", inprocScheme, path)
- ep, err := transport.NewEndpoint(url)
+ ep, err := transport.NewEndpoint(path)
c.Assert(err, IsNil)
*basic = ep
sto, err := filesystem.NewStorage(fs)
@@ -56,15 +52,13 @@ func (s *BaseSuite) prepareRepositories(c *C, basic *transport.Endpoint,
s.loader[ep.String()] = sto
path = "/empty.git"
- url = fmt.Sprintf("%s://%s", inprocScheme, path)
- ep, err = transport.NewEndpoint(url)
+ ep, err = transport.NewEndpoint(path)
c.Assert(err, IsNil)
*empty = ep
s.loader[ep.String()] = memory.NewStorage()
path = "/non-existent.git"
- url = fmt.Sprintf("%s://%s", inprocScheme, path)
- ep, err = transport.NewEndpoint(url)
+ ep, err = transport.NewEndpoint(path)
c.Assert(err, IsNil)
*nonExistent = ep
}