Fix swallowed err in acctest package

This commit is contained in:
Lars Lehtonen 2017-07-19 16:24:41 -07:00
parent 8666d36609
commit e34f194b31
No known key found for this signature in database
GPG Key ID: 8137D474EBCB04F2
1 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,9 @@ func RandStringFromCharSet(strlen int, charSet string) string {
// returned in OpenSSH format, and the private key is PEM encoded.
func RandSSHKeyPair(comment string) (string, string, error) {
privateKey, privateKeyPEM, err := genPrivateKey()
if err != nil {
return "", "", err
}
publicKey, err := ssh.NewPublicKey(&privateKey.PublicKey)
if err != nil {