From 5932c90c13dc415ab1448711961d398c51f97b8b Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Mon, 11 Sep 2017 15:16:32 +0200 Subject: Skip failure dedup instead of crashing This makes the callback plugin behave better when dedup is not possible: work with the original list of failures instead of raising an unhandled exception and producing confusing output for users. --- .../test/zz_failure_summary_test.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'roles/openshift_health_checker/test') diff --git a/roles/openshift_health_checker/test/zz_failure_summary_test.py b/roles/openshift_health_checker/test/zz_failure_summary_test.py index 0fc258133..69f27653c 100644 --- a/roles/openshift_health_checker/test/zz_failure_summary_test.py +++ b/roles/openshift_health_checker/test/zz_failure_summary_test.py @@ -65,6 +65,21 @@ import pytest }, ], ), + # if a failure contain an unhashable value, it will not be deduplicated + ( + [ + { + 'host': 'master1', + 'msg': {'unhashable': 'value'}, + }, + ], + [ + { + 'host': 'master1', + 'msg': {'unhashable': 'value'}, + }, + ], + ), ]) def test_deduplicate_failures(failures, deduplicated): assert deduplicate_failures(failures) == deduplicated -- cgit v1.2.3