plugin: Add a test for timeout and broken manifest

Both of these plugins will fail in interesting ways, and we should
still handle them correctly.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2018-12-03 22:00:27 +01:00
committed by Rusty Russell
parent bd6ce102e6
commit f5a3f1f0a2
2 changed files with 73 additions and 0 deletions

View File

@@ -77,3 +77,18 @@ def test_plugin_disable(node_factory):
'helloworld.py')]))
with pytest.raises(RpcError):
n.rpc.hello(name='Sun')
def test_failing_plugins():
fail_plugins = [
'contrib/plugins/fail/failtimeout.py',
'contrib/plugins/fail/doesnotexist.py',
]
for p in fail_plugins:
with pytest.raises(subprocess.CalledProcessError):
subprocess.check_output([
'lightningd/lightningd',
'--plugin={}'.format(p),
'--help',
])