automated integration tests for cloudstack (#20552)

This commit is contained in:
René Moser 2017-05-09 05:32:11 +02:00 committed by Matt Clay
commit aaf4f04574
92 changed files with 1248 additions and 193 deletions

View file

@ -0,0 +1,3 @@
cloud/cs
posix/ci/cloud/cs
skip/python3

View file

@ -0,0 +1,3 @@
---
dependencies:
- cs_common

View 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