summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Wienand <iwienand@redhat.com>2022-08-24 07:24:55 +1000
committerIan Wienand <iwienand@redhat.com>2022-08-24 13:29:45 +1000
commit98296dd5f6e27993f8ccd85dc439d3a54f66a112 (patch)
tree8c0c35925d8ca6d67068fb99b4da80742e2b097e /tests
parent619999b6db425e4710a56db6d174e6df0c6c1a34 (diff)
downloadzuul-98296dd5f6e27993f8ccd85dc439d3a54f66a112.tar.gz
zuul_stream: handle failed_when tasks
Currently the task in the test playbook - hosts: compute1 tasks: - name: Command Not Found command: command-not-found failed_when: false is failing in the zuul_stream callback with an exception trying to fill out the "delta" value in the message here. The result dict (taken from the new output) shows us why: 2022-08-24 07:19:27.079961 | TASK [Command Not Found] 2022-08-24 07:19:28.578380 | compute1 | ok: ERROR (ignored) 2022-08-24 07:19:28.578622 | compute1 | { 2022-08-24 07:19:28.578672 | compute1 | "failed_when_result": false, 2022-08-24 07:19:28.578700 | compute1 | "msg": "[Errno 2] No such file or directory: b'command-not-found'", 2022-08-24 07:19:28.578726 | compute1 | "rc": 2 2022-08-24 07:19:28.578750 | compute1 | } i.e. it has no start/stop/delta in the result (it did run and fail, so you'd think it might ... but this is what Ansible gives us). This checks for this path; as mentioned the output will now look like above in this case. This was found by the prior change I9f569a411729f8a067de17d99ef6b9d74fc21543. This fixes the current warning, so we invert the test to prevent further regressions. Change-Id: I106b2bbe626ed5af8ca739d354ba41eca2f08f77
Diffstat (limited to 'tests')
-rw-r--r--tests/remote/test_remote_zuul_stream.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/remote/test_remote_zuul_stream.py b/tests/remote/test_remote_zuul_stream.py
index c163b3488..03247b9ce 100644
--- a/tests/remote/test_remote_zuul_stream.py
+++ b/tests/remote/test_remote_zuul_stream.py
@@ -139,9 +139,7 @@ class FunctionalZuulStreamMixIn:
# Callback Exception:
# ...
#
- # NOTE(ianw) 2022-08-24 : needs a couple of fixes before
- # we can turn on.
- self.assertIn('[WARNING]: Failure using method', console_output)
+ self.assertNotIn('[WARNING]: Failure using method', console_output)
text = self._get_job_output(build)
self.assertLogLine(