mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
automated integration tests for cloudstack (#20552)
This commit is contained in:
parent
b58cf0d23a
commit
aaf4f04574
92 changed files with 1248 additions and 193 deletions
3
test/integration/targets/cs_iso/aliases
Normal file
3
test/integration/targets/cs_iso/aliases
Normal file
|
@ -0,0 +1,3 @@
|
|||
cloud/cs
|
||||
posix/ci/cloud/cs
|
||||
skip/python3
|
3
test/integration/targets/cs_iso/meta/main.yml
Normal file
3
test/integration/targets/cs_iso/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- cs_common
|
71
test/integration/targets/cs_iso/tasks/main.yml
Normal file
71
test/integration/targets/cs_iso/tasks/main.yml
Normal file
|
@ -0,0 +1,71 @@
|
|||
---
|
||||
- name: ensure iso is deleted
|
||||
cs_iso:
|
||||
name: "{{ cs_resource_prefix }}-iso"
|
||||
state: absent
|
||||
register: iso
|
||||
- name: verify ensure iso is deleted
|
||||
assert:
|
||||
that:
|
||||
- iso|success
|
||||
|
||||
- name: test download iso
|
||||
cs_iso:
|
||||
name: "{{ cs_resource_prefix }}-iso"
|
||||
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
|
||||
os_type: Debian GNU/Linux 7(64-bit)
|
||||
register: iso
|
||||
- name: verify test download iso
|
||||
assert:
|
||||
that:
|
||||
- iso|changed
|
||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||
|
||||
- name: test download iso idempotence
|
||||
cs_iso:
|
||||
name: "{{ cs_resource_prefix }}-iso"
|
||||
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
|
||||
os_type: Debian GNU/Linux 7(64-bit)
|
||||
register: iso
|
||||
- name: verify test download iso idempotence
|
||||
assert:
|
||||
that:
|
||||
- not iso|changed
|
||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||
|
||||
# TODO: on 4.6 simulator no checksum was returned
|
||||
# TODO: check if this is a bug in 4.6
|
||||
#- name: test download iso idempotence by checksum
|
||||
# cs_iso:
|
||||
# name: "{{ cs_resource_prefix }}-iso2"
|
||||
# checksum: "{{ iso.checksum }}"
|
||||
# url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
|
||||
# os_type: Debian GNU/Linux 7(64-bit)
|
||||
# register: iso2
|
||||
#- name: verify test download iso idempotence by checksum
|
||||
# assert:
|
||||
# that:
|
||||
# - not iso2|changed
|
||||
# - iso2.name == "{{ cs_resource_prefix }}-iso"
|
||||
# - iso2.checksum == iso.checksum
|
||||
|
||||
- name: test remove iso
|
||||
cs_iso:
|
||||
name: "{{ cs_resource_prefix }}-iso"
|
||||
state: absent
|
||||
register: iso
|
||||
- name: verify test remove iso
|
||||
assert:
|
||||
that:
|
||||
- iso|changed
|
||||
- iso.name == "{{ cs_resource_prefix }}-iso"
|
||||
|
||||
- name: test remove iso idempotence
|
||||
cs_iso:
|
||||
name: "{{ cs_resource_prefix }}-iso"
|
||||
state: absent
|
||||
register: iso
|
||||
- name: verify test remove iso idempotence
|
||||
assert:
|
||||
that:
|
||||
- not iso|changed
|
Loading…
Add table
Add a link
Reference in a new issue