mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Move create key call into try/except in Digital Ocean key test
This commit is contained in:
parent
c6069520f1
commit
128ba07f95
1 changed files with 8 additions and 8 deletions
|
@ -102,15 +102,15 @@ class DigitalOceanTest(ShellCase):
|
|||
pub = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example'
|
||||
finger_print = '3b:16:bf:e4:8b:00:8b:b8:59:8c:a9:d3:f0:19:45:fa'
|
||||
|
||||
_key = self.run_cloud('-f create_key {0} name="MyPubKey" public_key="{1}"'.format(PROVIDER_NAME, pub))
|
||||
|
||||
# Upload public key
|
||||
self.assertIn(
|
||||
finger_print,
|
||||
[i.strip() for i in _key]
|
||||
)
|
||||
|
||||
try:
|
||||
_key = self.run_cloud('-f create_key {0} name="MyPubKey" public_key="{1}"'.format(PROVIDER_NAME, pub))
|
||||
|
||||
# Upload public key
|
||||
self.assertIn(
|
||||
finger_print,
|
||||
[i.strip() for i in _key]
|
||||
)
|
||||
|
||||
# List all keys
|
||||
list_keypairs = self.run_cloud('-f list_keypairs {0}'.format(PROVIDER_NAME))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue