mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-09 08:42:33 -04:00
communicator/ssh: Test to verify keychain impls ssh.ClientKeyring
This commit is contained in:
parent
abcdd5a613
commit
39a05400dd
1 changed files with 12 additions and 1 deletions
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue