diff options
author | Santiago M. Mola <santi@mola.io> | 2017-04-28 17:24:14 +0200 |
---|---|---|
committer | Santiago M. Mola <santi@mola.io> | 2017-06-02 16:41:37 +0200 |
commit | d823a80ce65c582d007a378901e534a0880d779d (patch) | |
tree | 93720300d86f340908d82d6b4efd262d5b58bb6b | |
parent | 37f1ad489933c5460b4caf99d47dd66c3183ebd1 (diff) | |
download | go-git-d823a80ce65c582d007a378901e534a0880d779d.tar.gz |
test: use regular paths for inproc server tests (windows)
-rw-r--r-- | plumbing/transport/server/server_test.go | 20 |
1 files changed, 7 insertions, 13 deletions
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 } |