rgb-cln/tests/plugins
Christian Decker 9d4148ce68 pylightning: Warn users of plugins that may break due to extra args
We recently noticed that the way we unpack the call arguments for hooks and
notifications in pylightning breaks pretty quickly once you start changing the
hook and notification params. If you add params they will not get mapped
correctly causing the plugin to error out.

This can be fixed by adding a `VAR_KEYWORD` argument to the calbacks, i.e., by
adding a single `**kwargs` argument at the end of the signature. This commit
adds a check that such a catch-all argument exists, and emits a warning if it
doesn't.

It also fixes up the plugins that we ship ourselves.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-08-05 00:19:48 +00:00
..
asynctest.py pylightning: Split @method and @async_method decorators 2019-02-22 02:59:36 +00:00
dblog.py pylightning: Warn users of plugins that may break due to extra args 2019-08-05 00:19:48 +00:00
fail_htlcs.py pylightning: Warn users of plugins that may break due to extra args 2019-08-05 00:19:48 +00:00
forward_payment_status.py pytest: Add a simple plugin to test 'forward_event' 2019-08-01 18:49:25 +08:00
hold_htlcs.py pylightning: Warn users of plugins that may break due to extra args 2019-08-05 00:19:48 +00:00
hold_invoice.py pylightning: Warn users of plugins that may break due to extra args 2019-08-05 00:19:48 +00:00
millisatoshis.py pytest: test that we translate to and from Millisatoshi on plugin RPC. 2019-02-25 21:45:21 +00:00
misc_notifications.py Test and document 'channel_opened' notification 2019-07-27 12:18:25 +02:00
pretend_badlog.py pylightning: Warn users of plugins that may break due to extra args 2019-08-05 00:19:48 +00:00
reject.py pylightning: Warn users of plugins that may break due to extra args 2019-08-05 00:19:48 +00:00
reject_odd_funding_amounts.py pylightning: Warn users of plugins that may break due to extra args 2019-08-05 00:19:48 +00:00
reject_some_invoices.py pylightning: Warn users of plugins that may break due to extra args 2019-08-05 00:19:48 +00:00
shortcircuit.py pylightning: Warn users of plugins that may break due to extra args 2019-08-05 00:19:48 +00:00
slow_init.py pytest: test for crash when we do a plugin op and a plugin has not finished init 2019-07-30 08:44:01 +08:00
static.py lightningd/plugin_control: don't control non-dynamic plugins 2019-07-28 07:24:04 +00:00
utf8.py pytest: test passing utf8 into and out of plugin JSON. 2019-03-05 11:43:22 +01:00