Merge pull request #15598 from alrs/helper-swallowed-error

Fix swallowed err in acctest package
This commit is contained in:
Jake Champlin 2017-07-20 00:33:15 -06:00 committed by GitHub
commit c40be7cd14
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. // returned in OpenSSH format, and the private key is PEM encoded.
func RandSSHKeyPair(comment string) (string, string, error) { func RandSSHKeyPair(comment string) (string, string, error) {
privateKey, privateKeyPEM, err := genPrivateKey() privateKey, privateKeyPEM, err := genPrivateKey()
if err != nil {
return "", "", err
}
publicKey, err := ssh.NewPublicKey(&privateKey.PublicKey) publicKey, err := ssh.NewPublicKey(&privateKey.PublicKey)
if err != nil { if err != nil {