- Wait for API to be ready.
- Enumerate test cases on controller.
(cherry picked from commit 29de0619e860cd1dad111b3572aed42c90929cbf)
Co-authored-by: Matt Clay <matt@mystile.com>
... | ... |
@@ -1,19 +1,9 @@ |
1 | 1 |
--- |
2 | 2 |
|
3 | 3 |
- block: |
4 |
- - name: collect all test cases |
|
5 |
- find: |
|
6 |
- paths: "{{ role_path }}/tests" |
|
7 |
- patterns: "{{ testcase }}.yaml" |
|
8 |
- delegate_to: localhost |
|
9 |
- register: test_cases |
|
10 |
- |
|
11 |
- - name: set test_items |
|
12 |
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" |
|
13 |
- |
|
14 | 4 |
- name: run test case |
15 | 5 |
include: "{{ test_case_to_run }}" |
16 |
- with_items: "{{ test_items }}" |
|
6 |
+ with_fileglob: "{{ role_path }}/tests/{{ testcase }}.yaml" |
|
17 | 7 |
loop_control: |
18 | 8 |
loop_var: test_case_to_run |
19 | 9 |
when: "ansible_python_version is version('2.7', '>=')" |