diff options
author | Rodolfo Carvalho <rhcarvalho@gmail.com> | 2017-09-11 15:16:32 +0200 |
---|---|---|
committer | Rodolfo Carvalho <rhcarvalho@gmail.com> | 2017-09-11 15:16:32 +0200 |
commit | 5932c90c13dc415ab1448711961d398c51f97b8b (patch) | |
tree | 54d1d608f4a6c0fcfe9063271cac3a2f017a27e6 /roles/openshift_health_checker/test/zz_failure_summary_test.py | |
parent | 69f03840248a0adadb38b73d9155393af9b069fb (diff) | |
download | openshift-5932c90c13dc415ab1448711961d398c51f97b8b.tar.gz openshift-5932c90c13dc415ab1448711961d398c51f97b8b.tar.bz2 openshift-5932c90c13dc415ab1448711961d398c51f97b8b.tar.xz openshift-5932c90c13dc415ab1448711961d398c51f97b8b.zip |
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.
Diffstat (limited to 'roles/openshift_health_checker/test/zz_failure_summary_test.py')
-rw-r--r-- | roles/openshift_health_checker/test/zz_failure_summary_test.py | 15 |
1 files changed, 15 insertions, 0 deletions
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 |