aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/server/server_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-07-11 06:38:02 -0700
committerGitHub <noreply@github.com>2017-07-11 06:38:02 -0700
commitec0f30691de82d5e48827ba275acfad585d60963 (patch)
treec920be038faed44f8983695e9e21eba38741d800 /plumbing/transport/server/server_test.go
parentd42ecf655db7969fdaaa3e65be18e0c9be7ddb8f (diff)
parent8009cde25dda59ff13a97fabac9abb0b6ef57ef9 (diff)
downloadgo-git-ec0f30691de82d5e48827ba275acfad585d60963.tar.gz
Merge pull request #476 from smola/server-as-client
transport/server: add asClient parameter
Diffstat (limited to 'plumbing/transport/server/server_test.go')
-rw-r--r--plumbing/transport/server/server_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/plumbing/transport/server/server_test.go b/plumbing/transport/server/server_test.go
index 0f7201c..7912768 100644
--- a/plumbing/transport/server/server_test.go
+++ b/plumbing/transport/server/server_test.go
@@ -20,12 +20,18 @@ type BaseSuite struct {
loader server.MapLoader
client transport.Transport
clientBackup transport.Transport
+ asClient bool
}
func (s *BaseSuite) SetUpSuite(c *C) {
s.Suite.SetUpSuite(c)
s.loader = server.MapLoader{}
- s.client = server.NewServer(s.loader)
+ if s.asClient {
+ s.client = server.NewClient(s.loader)
+ } else {
+ s.client = server.NewServer(s.loader)
+ }
+
s.clientBackup = client.Protocols["file"]
client.Protocols["file"] = s.client
}