Fix syntax error so route table tests always try to clean up (#35663)

* Always try to clean up after route table tests

* Wait for a new VPC a chance to become available before attempting to get its current state
This commit is contained in:
Sloane Hertel 2018-02-02 15:38:47 -05:00 committed by GitHub
parent 4faad64579
commit 7917e3c988
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -356,6 +356,11 @@ def main():
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e:
module.fail_json_aws(e, "Failed to update enabled dns hostnames attribute")
try:
connection.get_waiter('vpc_available').wait(VpcIds=[vpc_id])
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e:
module.fail_json_aws(e, msg="Unable to wait for VPC {0} to be available.".format(vpc_id))
final_state = camel_dict_to_snake_dict(get_vpc(module, connection, vpc_id))
final_state['tags'] = boto3_tag_list_to_ansible_dict(final_state.get('tags', []))
final_state['id'] = final_state.pop('vpc_id')

View file

@ -545,7 +545,7 @@
- recreate_private_table.changed
- recreate_private_table.route_table.id != create_public_table.route_table.id
- always:
always:
#############################################################################
# TEAR DOWN STARTS HERE
#############################################################################