mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Enable cloud tests for use with ansible-test.
This commit is contained in:
parent
ac72fd9d2c
commit
17e07a27b2
89 changed files with 66 additions and 3 deletions
2
test/integration/targets/cs_affinitygroup/aliases
Normal file
2
test/integration/targets/cs_affinitygroup/aliases
Normal file
|
@ -0,0 +1,2 @@
|
|||
cloud/cs
|
||||
posix/ci/cloud/cs
|
3
test/integration/targets/cs_affinitygroup/meta/main.yml
Normal file
3
test/integration/targets/cs_affinitygroup/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- test_cs_common
|
58
test/integration/targets/cs_affinitygroup/tasks/main.yml
Normal file
58
test/integration/targets/cs_affinitygroup/tasks/main.yml
Normal file
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
- name: setup
|
||||
cs_affinitygroup: name={{ cs_resource_prefix }}_ag state=absent
|
||||
register: ag
|
||||
- name: verify setup
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
|
||||
- name: test fail if missing name
|
||||
action: cs_affinitygroup
|
||||
register: ag
|
||||
ignore_errors: true
|
||||
- name: verify results of fail if missing name
|
||||
assert:
|
||||
that:
|
||||
- ag|failed
|
||||
- "ag.msg == 'missing required arguments: name'"
|
||||
|
||||
- name: test present affinity group
|
||||
cs_affinitygroup: name={{ cs_resource_prefix }}_ag
|
||||
register: ag
|
||||
- name: verify results of create affinity group
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- ag|changed
|
||||
- ag.name == "{{ cs_resource_prefix }}_ag"
|
||||
|
||||
- name: test present affinity group is idempotence
|
||||
cs_affinitygroup: name={{ cs_resource_prefix }}_ag
|
||||
register: ag
|
||||
- name: verify results present affinity group is idempotence
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- not ag|changed
|
||||
- ag.name == "{{ cs_resource_prefix }}_ag"
|
||||
|
||||
- name: test absent affinity group
|
||||
cs_affinitygroup: name={{ cs_resource_prefix }}_ag state=absent
|
||||
register: ag
|
||||
- name: verify results of absent affinity group
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- ag|changed
|
||||
- ag.name == "{{ cs_resource_prefix }}_ag"
|
||||
|
||||
- name: test absent affinity group is idempotence
|
||||
cs_affinitygroup: name={{ cs_resource_prefix }}_ag state=absent
|
||||
register: ag
|
||||
- name: verify results of absent affinity group is idempotence
|
||||
assert:
|
||||
that:
|
||||
- ag|success
|
||||
- not ag|changed
|
||||
- ag.name is undefined
|
Loading…
Add table
Add a link
Reference in a new issue