test search, git clone, and installation to folder.
(node_factory)
| 310 | |
| 311 | @unittest.skipIf(VALGRIND, "virtual environment triggers memleak detection") |
| 312 | def test_disable_enable(node_factory): |
| 313 | """test search, git clone, and installation to folder.""" |
| 314 | n = get_reckless_node(node_factory) |
| 315 | # Test case-insensitive search as well |
| 316 | r = reckless([f"--network={NETWORK}", "-v", "install", "testPlugPass"], |
| 317 | dir=n.lightning_dir) |
| 318 | assert r.returncode == 0 |
| 319 | assert r.search_stdout('dependencies installed successfully') |
| 320 | assert r.search_stdout('plugin installed:') |
| 321 | assert r.search_stdout('testplugpass enabled') |
| 322 | r.check_stderr() |
| 323 | plugin_path = Path(n.lightning_dir) / 'reckless/testplugpass' |
| 324 | print(plugin_path) |
| 325 | assert os.path.exists(plugin_path) |
| 326 | r = reckless([f"--network={NETWORK}", "-v", "disable", "testPlugPass"], |
| 327 | dir=n.lightning_dir) |
| 328 | assert r.returncode == 0 |
| 329 | n.start() |
| 330 | # Should find it with or without the file extension |
| 331 | r = reckless([f"--network={NETWORK}", "-v", "enable", "testplugpass.py"], |
| 332 | dir=n.lightning_dir) |
| 333 | assert r.returncode == 0 |
| 334 | assert r.search_stdout('testplugpass enabled') |
| 335 | test_plugin = {'name': str(plugin_path / 'testplugpass.py'), |
| 336 | 'active': True, 'dynamic': True} |
| 337 | time.sleep(1) |
| 338 | print(n.rpc.plugin_list()['plugins']) |
| 339 | assert test_plugin in n.rpc.plugin_list()['plugins'] |
| 340 | |
| 341 | |
| 342 | @unittest.skipIf(VALGRIND, "virtual environment triggers memleak detection") |
nothing calls this directly
no test coverage detected