Repro: cln-plugin cannot subscribe to wildcard "*"

This test reproduces a bug in the `cln-plugin`-crate.
Core Lightning supports a wildcard `*` that plugins can use to
subscribe to all notifications.

However, `cln-plugin` does not support this case.
It allows the developer to subscribe `*`.
But the plug-in crashes when the first notification is received
This commit is contained in:
Erik De Smedt 2024-02-23 10:13:53 +01:00 committed by Alex Myers
parent 95b98cf0ee
commit 27eaa1ef44

View file

@ -382,3 +382,16 @@ def test_grpc_decode(node_factory):
string=inv.bolt11
))
print(res)
@pytest.mark.xfail(strict=True)
def test_rust_plugin_subscribe_wildcard(node_factory):
""" Creates a plugin that loads the subscribe_wildcard plugin
"""
bin_path = Path.cwd() / "target" / RUST_PROFILE / "examples" / "cln-subscribe-wildcard"
l1 = node_factory.get_node(options={"plugin": bin_path})
l2 = node_factory.get_node()
l2.connect(l1)
l1.daemon.wait_for_log("Received notification connect")