Merge pull request #15598 from alrs/helper-swallowed-error
Fix swallowed err in acctest package
This commit is contained in:
commit
c40be7cd14
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue