mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
[cloud][testing] New integration tests for ec2_asg (#30554)
* Add some integration tests for ec2_asg. * Remove exception handling from ec2_asg boto3 connection since it is handled in boto3_conn(). * Update test failure assertions * Use yaml anchor for credentials and remove unnecessary dependencies. * Move AWS boto3 module credentials tests to separate target * Remove filters from tests
This commit is contained in:
parent
46263d77f1
commit
788010d0f0
9 changed files with 510 additions and 11 deletions
|
@ -242,7 +242,10 @@ def get_aws_connection_info(module, boto3=False):
|
|||
module.fail_json(msg="boto is required for this module. Please install boto and try again")
|
||||
elif HAS_BOTO3:
|
||||
# here we don't need to make an additional call, will default to 'us-east-1' if the below evaluates to None.
|
||||
region = botocore.session.Session(profile=profile_name).get_config_variable('region')
|
||||
try:
|
||||
region = botocore.session.Session(profile=profile_name).get_config_variable('region')
|
||||
except botocore.exceptions.ProfileNotFound as e:
|
||||
pass
|
||||
else:
|
||||
module.fail_json(msg="Boto3 is required for this module. Please install boto3 and try again")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue