mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Merge pull request #52736 from dwoz/ec2test
Skip password decryption test when no libraries available
This commit is contained in:
commit
6bfca941a9
2 changed files with 3 additions and 0 deletions
|
@ -4887,6 +4887,8 @@ def get_password_data(
|
|||
ret[next(six.iterkeys(item))] = next(six.itervalues(item))
|
||||
|
||||
if not HAS_M2 and not HAS_PYCRYPTO:
|
||||
if 'key' in kwargs or 'key_file' in kwargs:
|
||||
log.warn("No crypto library is installed, can not decrypt password")
|
||||
return ret
|
||||
|
||||
if 'key' not in kwargs:
|
||||
|
|
|
@ -66,6 +66,7 @@ class EC2TestCase(TestCase, LoaderModuleMockMixin):
|
|||
self.assertRaises(
|
||||
SaltCloudSystemExit, ec2._validate_key_path_and_mode, 'key_file')
|
||||
|
||||
@skipIf(not ec2.HAS_M2 and not ec2.HAS_PYCRYPTO, 'Needs crypto library')
|
||||
@patch('salt.cloud.clouds.ec2._get_node')
|
||||
@patch('salt.cloud.clouds.ec2.get_location')
|
||||
@patch('salt.cloud.clouds.ec2.get_provider')
|
||||
|
|
Loading…
Add table
Reference in a new issue