zuul-stream: validate on per node basis
This is a small refactor to check the output of each node separately. This should have no effect, but makes it easier to add more testing in a follow-on change. Change-Id: Ic5d490c54da968b23fed068253f5be0249ea953a
This commit is contained in:
@@ -77,8 +77,10 @@
|
||||
- name: Validate outputs
|
||||
include_tasks: validate.yaml
|
||||
loop:
|
||||
- job-output-success-19887.txt
|
||||
- job-output-success-19885.txt
|
||||
- { node: 'node1', filename: 'job-output-success-19887.txt' }
|
||||
- { node: 'node2', filename: 'job-output-success-19887.txt' }
|
||||
- { node: 'node1', filename: 'job-output-success-19885.txt' }
|
||||
- { node: 'node2', filename: 'job-output-success-19885.txt' }
|
||||
|
||||
# failure case
|
||||
|
||||
|
||||
@@ -1,38 +1,29 @@
|
||||
- name: Validate output - setupvar
|
||||
shell: |
|
||||
egrep "^.*\| node1 \|\s+\"setupvar\": {" {{ item }}
|
||||
egrep "^.*\| node2 \|\s+\"setupvar\": {" {{ item }}
|
||||
egrep "^.*\| {{ item.node }} \|\s+\"setupvar\": {" {{ item.filename }}
|
||||
|
||||
- name: Validate output - shell task
|
||||
shell: |
|
||||
egrep "^.*\| node1 \| 1: lo:" {{ item }}
|
||||
egrep "^.*\| node2 \| 1: lo:" {{ item }}
|
||||
egrep "^.*\| {{ item.node }} \| 1: lo:" {{ item.filename }}
|
||||
|
||||
- name: Validate output - loop with items
|
||||
shell: |
|
||||
egrep "^.+\| node1 \| ok: Item: item1" {{ item }}
|
||||
egrep "^.+\| node1 \| ok: Item: item2" {{ item }}
|
||||
egrep "^.+\| node1 \| ok: Item: item3" {{ item }}
|
||||
egrep "^.+\| node2 \| ok: Item: item1" {{ item }}
|
||||
egrep "^.+\| node2 \| ok: Item: item2" {{ item }}
|
||||
egrep "^.+\| node2 \| ok: Item: item3" {{ item }}
|
||||
egrep "^.+\| {{ item.node }} \| ok: Item: item1" {{ item.filename }}
|
||||
egrep "^.+\| {{ item.node }} \| ok: Item: item2" {{ item.filename }}
|
||||
egrep "^.+\| {{ item.node }} \| ok: Item: item3" {{ item.filename }}
|
||||
|
||||
- name: Validate output - loop with complex items
|
||||
shell: |
|
||||
egrep "^.+\| node1 \| ok: Item: Runtime" {{ item }}
|
||||
egrep "^.+\| node2 \| ok: Item: Runtime" {{ item }}
|
||||
egrep "^.+\| {{ item.node }} \| ok: Item: Runtime" {{ item.filename }}
|
||||
|
||||
- name: Validate output - failed shell task
|
||||
shell: |
|
||||
egrep "^.+\| node1 \| Exception: Test module failure exception task" {{ item }}
|
||||
egrep "^.+\| node2 \| Exception: Test module failure exception task" {{ item }}
|
||||
egrep "^.+\| {{ item.node }} \| Exception: Test module failure exception task" {{ item.filename }}
|
||||
|
||||
- name: Validate output - item loop with exception
|
||||
shell: |
|
||||
egrep "^.+\| node1 \| Exception: Test module failure exception loop" {{ item }}
|
||||
egrep "^.+\| node2 \| Exception: Test module failure exception loop" {{ item }}
|
||||
egrep "^.+\| {{ item.node }} \| Exception: Test module failure exception loop" {{ item.filename }}
|
||||
|
||||
- name: Validate output - binary data
|
||||
shell: |
|
||||
egrep "^.*\| node1 \| \\\\x80abc" {{ item }}
|
||||
egrep "^.*\| node2 \| \\\\x80abc" {{ item }}
|
||||
egrep "^.*\| {{ item.node }} \| \\\\x80abc" {{ item.filename }}
|
||||
|
||||
Reference in New Issue
Block a user