diff options
-rw-r--r-- | playbooks/zuul-stream/functional.yaml | 6 | ||||
-rw-r--r-- | playbooks/zuul-stream/validate.yaml | 27 |
2 files changed, 13 insertions, 20 deletions
diff --git a/playbooks/zuul-stream/functional.yaml b/playbooks/zuul-stream/functional.yaml index 7ae4704a9..b8a44a87c 100644 --- a/playbooks/zuul-stream/functional.yaml +++ b/playbooks/zuul-stream/functional.yaml @@ -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 diff --git a/playbooks/zuul-stream/validate.yaml b/playbooks/zuul-stream/validate.yaml index 73ccd873a..81c613406 100644 --- a/playbooks/zuul-stream/validate.yaml +++ b/playbooks/zuul-stream/validate.yaml @@ -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 }} |