diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-06-17 12:53:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-17 12:53:39 +0200 |
commit | 86f6ba1dea8972df7c017e01ddb2c097892bc220 (patch) | |
tree | a7add5abd733fbc4362d80eecd5fa16f23a21901 /plumbing/transport/server | |
parent | bf3a92052f715c507ace0cb9f2b7fb358f623abc (diff) | |
parent | aba32ceed59d77c84038fa421b230e1ea76a5e6b (diff) | |
download | go-git-86f6ba1dea8972df7c017e01ddb2c097892bc220.tar.gz |
Merge pull request #369 from smola/windows
Windows support
Diffstat (limited to 'plumbing/transport/server')
-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 } |