summaryrefslogtreecommitdiff
path: root/test/legacy
diff options
context:
space:
mode:
authorHenryk Konsek <hekonsek@gmail.com>2018-07-12 15:43:23 +0200
committerAdam Miller <admiller@redhat.com>2018-07-12 08:43:23 -0500
commitebeb46aa618d49ad7bb20115819925970a8f2352 (patch)
tree9e9459dde55f1606f1cb1dd23b468780e1dffe2b /test/legacy
parent5465dca7ec304ef762a2b6cc40150b95fb1a415e (diff)
downloadansible-ebeb46aa618d49ad7bb20115819925970a8f2352.tar.gz
Added Scaleway volume module (#41667)
* Added Scaleway volume module. * Fixed imports order. * Fixed version added. * Improved sanity checks. * Fixing style formatting. * Added new line at the end of file. Fixed typo in comment.
Diffstat (limited to 'test/legacy')
-rw-r--r--test/legacy/scaleway_volume.yml53
1 files changed, 53 insertions, 0 deletions
diff --git a/test/legacy/scaleway_volume.yml b/test/legacy/scaleway_volume.yml
new file mode 100644
index 0000000000..5ef999027c
--- /dev/null
+++ b/test/legacy/scaleway_volume.yml
@@ -0,0 +1,53 @@
+# SCW_API_KEY='XXX' SCW_ORG='YYY' ansible-playbook ./test/legacy/scaleway_volume.yml
+
+- name: Test compute instance lifecyle on a Scaleway account
+ hosts: localhost
+ gather_facts: no
+ environment:
+ SCW_API_KEY: "{{ lookup('env', 'SCW_API_KEY') }}"
+ vars:
+ scw_org: "{{ lookup('env', 'SCW_ORG') }}"
+
+ tasks:
+
+ - name: Make sure volume is not there before tests
+ scaleway_volume:
+ name: ansible-test-volume
+ state: absent
+ region: par1
+ organization: "{{ scw_org }}"
+ register: server_creation_check_task
+
+ - assert:
+ that:
+ - server_creation_check_task is success
+
+ - name: Create volume
+ scaleway_volume:
+ name: ansible-test-volume
+ state: present
+ region: par1
+ organization: "{{ scw_org }}"
+ "size": 10000000000
+ volume_type: l_ssd
+ register: server_creation_check_task
+
+ - debug: var=server_creation_check_task
+
+ - assert:
+ that:
+ - server_creation_check_task is success
+ - server_creation_check_task is changed
+
+ - name: Make sure volume is deleted
+ scaleway_volume:
+ name: ansible-test-volume
+ state: absent
+ region: par1
+ organization: "{{ scw_org }}"
+ register: server_creation_check_task
+
+ - assert:
+ that:
+ - server_creation_check_task is success
+ - server_creation_check_task is changed