Merge "Validate zuul_stream func test output" into feature/zuulv3

This commit is contained in:
Zuul 2017-09-02 19:31:16 +00:00 committed by Gerrit Code Review
commit 2463f3c19e
3 changed files with 49 additions and 5 deletions

View File

@ -7,9 +7,9 @@
- name: Run a shell task with an ansible python exception
command: echo foo
args:
chdir: /somewhere/that/does/not/exist
chdir: /failure-shelltask/somewhere/that/does/not/exist
- always:
always:
- name: Loop with items on an ansible python exception
command: "echo {{ item }}"
@ -18,4 +18,4 @@
- item2
- item3
args:
chdir: /somewhere/that/does/not/exist
chdir: /failure-itemloop/somewhere/that/does/not/exist

View File

@ -30,7 +30,7 @@
- name: Run a shell task with an ansible python exception
command: echo foo
args:
chdir: /somewhere/that/does/not/exist
chdir: /shelltask/somewhere/that/does/not/exist
failed_when: false
- name: Loop with items on an ansible python exception
@ -40,5 +40,5 @@
- item2
- item3
args:
chdir: /somewhere/that/does/not/exist
chdir: /itemloop/somewhere/that/does/not/exist
failed_when: false

View File

@ -15,6 +15,50 @@
ZUUL_JOB_LOG_CONFIG: "{{ ansible_user_dir}}/logging.json"
ARA_LOG_CONFIG: "{{ ansible_user_dir}}/logging.json"
- name: Validate output - setupvar
shell: |
egrep "^.*\| node1 \|\s+\"setupvar\": {" job-output.txt
egrep "^.*\| node2 \|\s+\"setupvar\": {" job-output.txt
- name: Validate output - shell task
shell: |
egrep "^.*\| node1 \| link/loopback" job-output.txt
egrep "^.*\| node2 \| link/loopback" job-output.txt
- name: Validate output - loop with items
shell: |
egrep "^.+\| node1 \| ok: Item: item1" job-output.txt
egrep "^.+\| node1 \| ok: Item: item2" job-output.txt
egrep "^.+\| node1 \| ok: Item: item3" job-output.txt
egrep "^.+\| node2 \| ok: Item: item1" job-output.txt
egrep "^.+\| node2 \| ok: Item: item2" job-output.txt
egrep "^.+\| node2 \| ok: Item: item3" job-output.txt
- name: Validate output - loop with complex items
shell: |
egrep "^.+\| node1 \| ok: Item: Runtime" job-output.txt
egrep "^.+\| node2 \| ok: Item: Runtime" job-output.txt
- name: Validate output - shell task with exception
shell: |
egrep "^.+\| node1 \| OSError.+\/shelltask\/" job-output.txt
egrep "^.+\| node2 \| OSError.+\/shelltask\/" job-output.txt
- name: Validate output - item loop with exception
shell: |
egrep "^.+\| node1 \| OSError.+\/itemloop\/" job-output.txt
egrep "^.+\| node2 \| OSError.+\/itemloop\/" job-output.txt
- name: Validate output - failure shell task with exception
shell: |
egrep "^.+\| node1 \| OSError.+\/failure-shelltask\/" job-output.txt
egrep "^.+\| node2 \| OSError.+\/failure-shelltask\/" job-output.txt
- name: Validate output - failure item loop with exception
shell: |
egrep "^.+\| node1 \| OSError.+\/failure-itemloop\/" job-output.txt
egrep "^.+\| node2 \| OSError.+\/failure-itemloop\/" job-output.txt
- name: Generate ARA html
command: ara generate html ara-output