mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
0d32cb9228
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 '_'. |
||
---|---|---|
.. | ||
__init__.py | ||
test_libvirt_events.py | ||
test_slack.py | ||
test_sqs_events.py |