Test that a plugin which fails (not during a command)
(node_factory)
| 2524 | |
| 2525 | |
| 2526 | def test_plugin_fail(node_factory): |
| 2527 | """Test that a plugin which fails (not during a command)""" |
| 2528 | plugin = os.path.join(os.path.dirname(__file__), 'plugins/fail_by_itself.py') |
| 2529 | l1 = node_factory.get_node(options={"plugin": plugin}) |
| 2530 | |
| 2531 | time.sleep(2) |
| 2532 | # It should clean up! |
| 2533 | assert 'failcmd' not in [h['command'] for h in l1.rpc.help()['help']] |
| 2534 | # Can happen *before* the 'Server started with public key' |
| 2535 | l1.daemon.logsearch_start = 0 |
| 2536 | l1.daemon.wait_for_log(r': exited during normal operation') |
| 2537 | |
| 2538 | l1.rpc.plugin_start(plugin) |
| 2539 | time.sleep(2) |
| 2540 | # It should clean up! |
| 2541 | assert 'failcmd' not in [h['command'] for h in l1.rpc.help()['help']] |
| 2542 | l1.daemon.wait_for_log(r': exited during normal operation') |
| 2543 | |
| 2544 | |
| 2545 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected