Commit 39a05400 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

communicator/ssh: Test to verify keychain impls ssh.ClientKeyring

parent abcdd5a6
package ssh package ssh
import "testing" import (
"code.google.com/p/go.crypto/ssh"
"testing"
)
const testPrivateKey = `-----BEGIN RSA PRIVATE KEY----- const testPrivateKey = `-----BEGIN RSA PRIVATE KEY-----
MIIBOwIBAAJBALdGZxkXDAjsYk10ihwU6Id2KeILz1TAJuoq4tOgDWxEEGeTrcld MIIBOwIBAAJBALdGZxkXDAjsYk10ihwU6Id2KeILz1TAJuoq4tOgDWxEEGeTrcld
...@@ -19,3 +22,11 @@ func TestAddPEMKey(t *testing.T) { ...@@ -19,3 +22,11 @@ func TestAddPEMKey(t *testing.T) {
t.Fatalf("error while adding key: %s", err) 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")
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment