mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-03-26 21:43:02 +00:00
Merge "CI: add retries for trait test"
This commit is contained in:
@@ -1,23 +1,28 @@
|
|||||||
---
|
---
|
||||||
- openstack.cloud.trait:
|
- name: Create trait
|
||||||
|
openstack.cloud.trait:
|
||||||
cloud: "{{ cloud }}"
|
cloud: "{{ cloud }}"
|
||||||
state: present
|
state: present
|
||||||
id: "{{ trait_name }}"
|
id: "{{ trait_name }}"
|
||||||
delegate_to: localhost
|
until: result is success
|
||||||
register: item
|
retries: 5
|
||||||
|
delay: 20
|
||||||
|
register: result
|
||||||
|
|
||||||
- assert:
|
- name: Assert trait
|
||||||
|
assert:
|
||||||
that:
|
that:
|
||||||
- "'name' in item.trait"
|
- "'name' in result.trait"
|
||||||
- "item.trait.id == trait_name"
|
- "result.trait.id == trait_name"
|
||||||
|
|
||||||
- openstack.cloud.trait:
|
- name: Remove trait
|
||||||
|
openstack.cloud.trait:
|
||||||
cloud: "{{ cloud }}"
|
cloud: "{{ cloud }}"
|
||||||
state: absent
|
state: absent
|
||||||
id: "{{ trait_name }}"
|
id: "{{ trait_name }}"
|
||||||
delegate_to: localhost
|
register: result1
|
||||||
register: item
|
|
||||||
|
|
||||||
- assert:
|
- name: Assert trait removed
|
||||||
|
assert:
|
||||||
that:
|
that:
|
||||||
- "'trait' not in item"
|
- "'trait' not in result1"
|
||||||
|
|||||||
Reference in New Issue
Block a user