pytest: Add a test for the event subscription and notification

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2018-12-13 17:35:01 +01:00
parent 5338d3115f
commit 25ca49c444
3 changed files with 30 additions and 2 deletions

View File

@@ -83,6 +83,18 @@ def test_plugin_disable(node_factory):
n.rpc.hello(name='Sun')
def test_plugin_notifications(node_factory):
l1, l2 = node_factory.get_nodes(2, opts={'plugin': 'contrib/plugins/helloworld.py'})
l1.connect(l2)
l1.daemon.wait_for_log(r'Received connect event')
l2.daemon.wait_for_log(r'Received connect event')
l2.rpc.disconnect(l1.info['id'])
l1.daemon.wait_for_log(r'Received disconnect event')
l2.daemon.wait_for_log(r'Received disconnect event')
def test_failing_plugins():
fail_plugins = [
'contrib/plugins/fail/failtimeout.py',