summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-08-24 05:04:36 +0000
committerGerrit Code Review <review@openstack.org>2022-08-24 05:04:36 +0000
commitccad41261995b04da240589a3308b4969d6fe44a (patch)
treeaa073402f650dd6d6210484fca6fea5c0f8dffd8
parentf3978d3b4ece437799a87969283c3ff7ccd30846 (diff)
parenta145daa4dd0955b2bdff27a3a49b2ff8095415ad (diff)
downloadzuul-ccad41261995b04da240589a3308b4969d6fe44a.tar.gz
Merge "zuul-stream: validate on per node basis"
-rw-r--r--playbooks/zuul-stream/functional.yaml6
-rw-r--r--playbooks/zuul-stream/validate.yaml27
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 }}