[cloud] s3: deleting a nonexistent bucket should not give a traceback Fixes #25445 (#25487)

* trying to delete a nonexistent bucket should not fail

* Improve error handling for deleting s3 bucket

* Allow successful deletion

* Add test for deleting a nonexistent bucket

rename integration test target from s3 to aws_s3
This commit is contained in:
Sloane Hertel
2017-06-12 13:52:25 -04:00
committed by Ryan Brown
parent 7521be73c1
commit 3f0c47196e
5 changed files with 36 additions and 4 deletions

View File

@@ -215,3 +215,16 @@
that:
- result.changed == True
# ============================================================
- name: test delete a nonexistent bucket
s3:
bucket: "{{ bucket.stdout + '.bucket' }}"
mode: delete
security_token: "{{security_token}}"
aws_access_key: "{{ ec2_access_key }}"
aws_secret_key: "{{ ec2_secret_key }}"
register: result
- name: assert that changed is False
assert:
that:
- result.changed == False
# ============================================================