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

Function test_renepay_not_important

tests/test_plugin.py:4506–4521  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

4504
4505
4506def test_renepay_not_important(node_factory):
4507 # I mean, it's *important*, it's just not "mission-critical" just yet!
4508 l1 = node_factory.get_node()
4509
4510 assert 'cln-renepay' not in l1.rpc.listconfigs()['configs']['important-plugin']['values_str']
4511 assert [p['active'] for p in l1.rpc.plugin_list()['plugins'] if p['name'].endswith('cln-renepay')] == [True]
4512
4513 # We can kill it without cln dying.
4514 line = l1.daemon.is_in_log(r'.*started\([0-9]*\).*plugins/cln-renepay')
4515 pidstr = re.search(r'.*started\(([0-9]*)\).*plugins/cln-renepay', line).group(1)
4516 os.kill(int(pidstr), signal.SIGKILL)
4517 l1.daemon.wait_for_log('plugin-cln-renepay: Killing plugin: exited during normal operation')
4518
4519 # But we don't shut down, and we can restrart.
4520 assert [p for p in l1.rpc.plugin_list()['plugins'] if p['name'].endswith('cln-renepay')] == []
4521 l1.rpc.plugin_start(os.path.join(os.getcwd(), 'plugins/cln-renepay'))
4522
4523
4524@unittest.skipIf(VALGRIND, "Valgrind doesn't handle bad #! lines the same")

Callers

nothing calls this directly

Calls 8

listconfigsMethod · 0.80
plugin_listMethod · 0.80
is_in_logMethod · 0.80
killMethod · 0.80
wait_for_logMethod · 0.80
plugin_startMethod · 0.80
joinMethod · 0.80
get_nodeMethod · 0.45

Tested by

no test coverage detected