diff options
author | Zuul <zuul@review.openstack.org> | 2017-09-02 19:31:16 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-09-02 19:31:16 +0000 |
commit | 2463f3c19e17402220452a4c1db6ba3f358cd84b (patch) | |
tree | 9a01a5ee1a79c2e3b6bec864c9953e1e7b00a2d6 /playbooks | |
parent | d5178d39bd8885ab4496f6e1fa6e92e2c783ae61 (diff) | |
parent | 13d6e58a99d550cbd5f14e83ff7b47506da543eb (diff) | |
download | zuul-2463f3c19e17402220452a4c1db6ba3f358cd84b.tar.gz |
Merge "Validate zuul_stream func test output" into feature/zuulv3
Diffstat (limited to 'playbooks')
-rw-r--r-- | playbooks/zuul-stream/fixtures/test-stream-failure.yaml | 6 | ||||
-rw-r--r-- | playbooks/zuul-stream/fixtures/test-stream.yaml | 4 | ||||
-rw-r--r-- | playbooks/zuul-stream/functional.yaml | 44 |
3 files changed, 49 insertions, 5 deletions
diff --git a/playbooks/zuul-stream/fixtures/test-stream-failure.yaml b/playbooks/zuul-stream/fixtures/test-stream-failure.yaml index 272431a9e..3e7b27a7f 100644 --- a/playbooks/zuul-stream/fixtures/test-stream-failure.yaml +++ b/playbooks/zuul-stream/fixtures/test-stream-failure.yaml @@ -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 diff --git a/playbooks/zuul-stream/fixtures/test-stream.yaml b/playbooks/zuul-stream/fixtures/test-stream.yaml index 29bbf4759..6a31ff8d4 100644 --- a/playbooks/zuul-stream/fixtures/test-stream.yaml +++ b/playbooks/zuul-stream/fixtures/test-stream.yaml @@ -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 diff --git a/playbooks/zuul-stream/functional.yaml b/playbooks/zuul-stream/functional.yaml index 4f676730d..7b5b84f9e 100644 --- a/playbooks/zuul-stream/functional.yaml +++ b/playbooks/zuul-stream/functional.yaml @@ -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 |