aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/server
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-04-28 15:20:51 +0200
committerSantiago M. Mola <santi@mola.io>2017-04-28 16:33:31 +0200
commit4a670e130804d630fa056e4a60101698dc7a9af1 (patch)
tree289fed4a798d9e3c7bdc633970109d8a7a856737 /plumbing/transport/server
parent727bf94da8e3cebd3ff467d30425b12d671fbca7 (diff)
downloadgo-git-4a670e130804d630fa056e4a60101698dc7a9af1.tar.gz
do not convert local paths to URL
* Do not convert local paths to URLs, just keep them as they are. * This way we add support for Windows without taking care of Windows path-to-URL conversion.
Diffstat (limited to 'plumbing/transport/server')
-rw-r--r--plumbing/transport/server/loader_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/plumbing/transport/server/loader_test.go b/plumbing/transport/server/loader_test.go
index b4a8c37..5f32cb0 100644
--- a/plumbing/transport/server/loader_test.go
+++ b/plumbing/transport/server/loader_test.go
@@ -1,7 +1,6 @@
package server
import (
- "fmt"
"os/exec"
"path/filepath"
@@ -33,7 +32,7 @@ func (s *LoaderSuite) endpoint(c *C, url string) transport.Endpoint {
}
func (s *LoaderSuite) TestLoadNonExistent(c *C) {
- sto, err := DefaultLoader.Load(s.endpoint(c, "file:///does-not-exist"))
+ sto, err := DefaultLoader.Load(s.endpoint(c, "does-not-exist"))
c.Assert(err, Equals, transport.ErrRepositoryNotFound)
c.Assert(sto, IsNil)
}
@@ -45,13 +44,13 @@ func (s *LoaderSuite) TestLoadNonExistentIgnoreHost(c *C) {
}
func (s *LoaderSuite) TestLoad(c *C) {
- sto, err := DefaultLoader.Load(s.endpoint(c, fmt.Sprintf("file://%s", s.RepoPath)))
+ sto, err := DefaultLoader.Load(s.endpoint(c, s.RepoPath))
c.Assert(err, IsNil)
c.Assert(sto, NotNil)
}
func (s *LoaderSuite) TestLoadIgnoreHost(c *C) {
- sto, err := DefaultLoader.Load(s.endpoint(c, fmt.Sprintf("file://%s", s.RepoPath)))
+ sto, err := DefaultLoader.Load(s.endpoint(c, s.RepoPath))
c.Assert(err, IsNil)
c.Assert(sto, NotNil)
}