salt/tests/unit/engines
Cédric Bosdonnat 0d32cb9228 libvirt events: fix domain defined/updated event details
Libvirt events algorigthm converting the libvirt enums into string has a
flaw that unit tests couldn't see. Libvirt python binding defines the
following constants:

VIR_DOMAIN_EVENT_CRASHED_PANICKED = 0
VIR_DOMAIN_EVENT_DEFINED = 0
VIR_DOMAIN_EVENT_CRASHED = 8

However VIR_DOMAIN_EVENT_CRASHED_PANICKED is the only value in this enum
and thus wasn't not considered a sub-enum element. So the value 0 in
enum 'VIR_DOMAIN_EVENT_' was wrongly mapped to "crashed panicked"
instead of "defined".

In order to safely rule this case out, check if we have an item that
just ends with the subprefix without the '_'.
2018-12-18 16:00:15 +01:00
..
__init__.py Refactor for testing and adding related engine tests 2016-09-19 17:10:19 -07:00
test_libvirt_events.py libvirt events: fix domain defined/updated event details 2018-12-18 16:00:15 +01:00
test_slack.py Rename slack engine test file to respect naming convention 2018-08-14 13:53:29 -05:00
test_sqs_events.py Add unicode_literals to engines 2018-01-07 14:01:48 -06:00