salt/tests/integration/reactor/test_reactor.py
Pedro Algarvio 8031ac0209
Move mixins to tests.support.mixins.
The adapted config mixin get config methods are not static methods
2017-04-04 17:29:34 +01:00

38 lines
877 B
Python

# -*- coding: utf-8 -*-
'''
integration.reactor.reactor
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Test Salt's reactor system
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt testing libs
import tests.integration as integration
from tests.support.helpers import flaky
# Import Salt libs
import salt.utils.event
class ReactorTest(integration.ModuleCase, integration.SaltMinionEventAssertsMixin):
'''
Test Salt's reactor system
'''
@flaky()
def test_ping_reaction(self):
'''
Fire an event on the master and ensure
that it pings the minion
'''
# Create event bus connection
e = salt.utils.event.get_event('minion', sock_dir=self.minion_opts['sock_dir'], opts=self.minion_opts)
e.fire_event({'a': 'b'}, '/test_event')
self.assertMinionEventReceived({'a': 'b'})