From 08e08d771ef03df80248c80d81475fe7c5ea6fe7 Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Wed, 23 Nov 2016 15:30:34 +0100 Subject: transport: create Client interface (#132) * plumbing: move plumbing/client package to plumbing/transport. * transport: create Client interface. * A Client can instantiate any client transport service. * InstallProtocol installs a Client for a given protocol, instead of just a UploadPackService. * A Client can open a session for fetch-pack or send-pack for a specific Endpoint. * Adapt ssh and http clients to the new client interface. * updated doc --- plumbing/client/ssh/auth_method_test.go | 94 --------------------------------- 1 file changed, 94 deletions(-) delete mode 100644 plumbing/client/ssh/auth_method_test.go (limited to 'plumbing/client/ssh/auth_method_test.go') diff --git a/plumbing/client/ssh/auth_method_test.go b/plumbing/client/ssh/auth_method_test.go deleted file mode 100644 index a87c950..0000000 --- a/plumbing/client/ssh/auth_method_test.go +++ /dev/null @@ -1,94 +0,0 @@ -package ssh - -import ( - "fmt" - "testing" - - . "gopkg.in/check.v1" -) - -func Test(t *testing.T) { TestingT(t) } - -type SuiteCommon struct{} - -var _ = Suite(&SuiteCommon{}) - -func (s *SuiteCommon) TestKeyboardInteractiveName(c *C) { - a := &KeyboardInteractive{ - User: "test", - Challenge: nil, - } - c.Assert(a.Name(), Equals, KeyboardInteractiveName) -} - -func (s *SuiteCommon) TestKeyboardInteractiveString(c *C) { - a := &KeyboardInteractive{ - User: "test", - Challenge: nil, - } - c.Assert(a.String(), Equals, fmt.Sprintf("user: test, name: %s", KeyboardInteractiveName)) -} - -func (s *SuiteCommon) TestPasswordName(c *C) { - a := &Password{ - User: "test", - Pass: "", - } - c.Assert(a.Name(), Equals, PasswordName) -} - -func (s *SuiteCommon) TestPasswordString(c *C) { - a := &Password{ - User: "test", - Pass: "", - } - c.Assert(a.String(), Equals, fmt.Sprintf("user: test, name: %s", PasswordName)) -} - -func (s *SuiteCommon) TestPasswordCallbackName(c *C) { - a := &PasswordCallback{ - User: "test", - Callback: nil, - } - c.Assert(a.Name(), Equals, PasswordCallbackName) -} - -func (s *SuiteCommon) TestPasswordCallbackString(c *C) { - a := &PasswordCallback{ - User: "test", - Callback: nil, - } - c.Assert(a.String(), Equals, fmt.Sprintf("user: test, name: %s", PasswordCallbackName)) -} - -func (s *SuiteCommon) TestPublicKeysName(c *C) { - a := &PublicKeys{ - User: "test", - Signer: nil, - } - c.Assert(a.Name(), Equals, PublicKeysName) -} - -func (s *SuiteCommon) TestPublicKeysString(c *C) { - a := &PublicKeys{ - User: "test", - Signer: nil, - } - c.Assert(a.String(), Equals, fmt.Sprintf("user: test, name: %s", PublicKeysName)) -} - -func (s *SuiteCommon) TestPublicKeysCallbackName(c *C) { - a := &PublicKeysCallback{ - User: "test", - Callback: nil, - } - c.Assert(a.Name(), Equals, PublicKeysCallbackName) -} - -func (s *SuiteCommon) TestPublicKeysCallbackString(c *C) { - a := &PublicKeysCallback{ - User: "test", - Callback: nil, - } - c.Assert(a.String(), Equals, fmt.Sprintf("user: test, name: %s", PublicKeysCallbackName)) -} -- cgit