b5e608ae8a
This patch moves test result logs [1] to tox folder [2] so that it is automatically added to the list of log files by zuul [1] sova.log, test_results/* [2] .tox/<envname>/log Change-Id: I57e4b05e199ded91b5ab26fa4054d6bbf1192fd2
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
---
|
|
- name: Validate that ER can parse what we produce
|
|
hosts: localhost
|
|
connection: local
|
|
gather_facts: true
|
|
|
|
vars:
|
|
er_dir: '../output/elastic-recheck'
|
|
test_results_dir: "../.tox/py{{ ansible_python_version.split('.')[:-1] | join('') }}/log/test_results"
|
|
|
|
tasks:
|
|
- name: Make sure dir for test output exists
|
|
file:
|
|
path: "{{ test_results_dir }}"
|
|
state: directory
|
|
mode: 0755
|
|
|
|
- name: Get list of er files from er directory
|
|
find:
|
|
paths: "{{ er_dir }}"
|
|
register: er_files_output
|
|
|
|
- name: Run elastic_recheck_query for all er files
|
|
vars:
|
|
output_file: "{{ test_results_dir }}/{{ item.path | basename }}.log"
|
|
shell: |
|
|
set -e
|
|
elastic-recheck-query "{{ item.path }}" > "{{ output_file }}" 2>&1
|
|
! grep -q "pyelasticsearch.exceptions.ElasticHttpError" "{{ output_file }}"
|
|
# This also fails if an exception is found inside the output files
|
|
loop: "{{ er_files_output.files }}"
|
|
loop_control:
|
|
label: "{{ item.path | basename }}"
|
|
register: er_output
|
|
changed_when: false
|