From 39a05400dd03e7fc71e96e52aa9d2fe5964bfc6c Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 20 May 2013 22:51:51 -0700 Subject: [PATCH] communicator/ssh: Test to verify keychain impls ssh.ClientKeyring --- communicator/ssh/keychain_test.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/communicator/ssh/keychain_test.go b/communicator/ssh/keychain_test.go index 0cbc09fae..5f9ba3ae5 100644 --- a/communicator/ssh/keychain_test.go +++ b/communicator/ssh/keychain_test.go @@ -1,6 +1,9 @@ package ssh -import "testing" +import ( + "code.google.com/p/go.crypto/ssh" + "testing" +) const testPrivateKey = `-----BEGIN RSA PRIVATE KEY----- MIIBOwIBAAJBALdGZxkXDAjsYk10ihwU6Id2KeILz1TAJuoq4tOgDWxEEGeTrcld @@ -19,3 +22,11 @@ func TestAddPEMKey(t *testing.T) { t.Fatalf("error while adding key: %s", err) } } + +func TestSimpleKeyChain_ImplementsClientkeyring(t *testing.T) { + var raw interface{} + raw = &SimpleKeychain{} + if _, ok := raw.(ssh.ClientKeyring); !ok { + t.Fatal("SimpleKeychain is not a valid ssh.ClientKeyring") + } +}