Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyton3 digitial ocean test fix: to_str on key #54038

Merged
merged 1 commit into from Jul 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/integration/cloud/clouds/test_digitalocean.py
Expand Up @@ -18,6 +18,7 @@
# Import Salt Libs
from salt.config import cloud_providers_config
from salt.ext.six.moves import range
import salt.utils.stringutils


# Create the cloud instance name to be used throughout the tests
Expand Down Expand Up @@ -107,7 +108,7 @@ def test_key_management(self):

# generate key and fingerprint
ssh_key = RSA.generate(4096)
pub = ssh_key.publickey().exportKey("OpenSSH")
pub = salt.utils.stringutils.to_str(ssh_key.publickey().exportKey("OpenSSH"))
key_hex = hashlib.md5(base64.b64decode(pub.strip().split()[1].encode())).hexdigest()
finger_print = ':'.join([key_hex[x:x+2] for x in range(0, len(key_hex), 2)])

Expand Down