MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_plugin_log_levels

Function test_plugin_log_levels

tests/test_cln_rs.py:116–127  ·  view source on GitHub ↗

Start a minimal plugin and ensure it logs all levels

(node_factory)

Source from the content-addressed store, hash-verified

114
115
116def test_plugin_log_levels(node_factory):
117 """Start a minimal plugin and ensure it logs all levels"""
118 bin_path = Path.cwd() / "target" / RUST_PROFILE / "examples" / "cln-plugin-startup"
119 l1 = node_factory.get_node(
120 options={"plugin": str(bin_path)}, broken_log=r"log::error! working"
121 )
122 l1.rpc.test_log_levels()
123 wait_for(lambda: l1.daemon.is_in_log(r"cln-plugin-startup: log::trace! working"))
124 wait_for(lambda: l1.daemon.is_in_log(r"cln-plugin-startup: log::debug! working"))
125 wait_for(lambda: l1.daemon.is_in_log(r"cln-plugin-startup: log::info! working"))
126 wait_for(lambda: l1.daemon.is_in_log(r"cln-plugin-startup: log::warn! working"))
127 wait_for(lambda: l1.daemon.is_in_log(r"cln-plugin-startup: log::error! working"))
128
129
130def test_grpc_connect(node_factory):

Callers

nothing calls this directly

Calls 3

wait_forFunction · 0.90
is_in_logMethod · 0.80
get_nodeMethod · 0.45

Tested by

no test coverage detected