ansible/test/legacy/roles/scaleway_s3/tasks/aws_s3_delobj.yml
Matt Clay b8f0cfc38a Move scaleway_s3 tests to the legacy directory.
These tests rely on the AWS S3 modules, but will not be migrated along with those modules into an AWS collection.

Since these tests will not reside in a collection alongside the modules under test they are being moved to the legacy tests directory.

The legacy tests directory will soon be migrated to a separate repository.
2020-02-18 13:02:51 -08:00

73 lines
1.4 KiB
YAML

- name: Delete an object (Check)
check_mode: yes
aws_s3:
mode: delobj
bucket: '{{ bucket_name }}'
s3_url: '{{ s3_url }}'
region: '{{ scaleway_region }}'
object: test.txt
encrypt: false
register: delobj_check_task
- name: Show delobj_check_task
debug:
var: delobj_check_task
- name: delobj_check_task is success
assert:
that:
- delobj_check_task is success
- name: delobj_check_task is changed
assert:
that:
- delobj_check_task is changed
- name: Delete an object
aws_s3:
mode: delobj
bucket: '{{ bucket_name }}'
s3_url: '{{ s3_url }}'
region: '{{ scaleway_region }}'
object: test.txt
encrypt: false
register: delobj_task
- name: Show delobj_task
debug:
var: delobj_task
- name: delobj_task is success
assert:
that:
- delobj_task is success
- name: delobj_task is changed
assert:
that:
- delobj_task is changed
- name: Delete an object (Confirmation)
aws_s3:
mode: delobj
bucket: '{{ bucket_name }}'
s3_url: '{{ s3_url }}'
region: '{{ scaleway_region }}'
object: test.txt
encrypt: false
register: delobj_confirmation_task
- name: Show delobj_confirmation_task
debug:
var: delobj_confirmation_task
- name: delobj_confirmation_task is success
assert:
that:
- delobj_confirmation_task is success
- name: delobj_confirmation_task is changed
assert:
that:
- delobj_confirmation_task is changed