Test search and install from local directory source.
(node_factory)
| 285 | |
| 286 | @unittest.skipIf(VALGRIND, "virtual environment triggers memleak detection") |
| 287 | def test_local_dir_install(node_factory): |
| 288 | """Test search and install from local directory source.""" |
| 289 | n = get_reckless_node(node_factory) |
| 290 | n.start() |
| 291 | source_dir = str(Path(n.lightning_dir / '..' / 'lightningd' / 'testplugpass').resolve()) |
| 292 | r = reckless([f"--network={NETWORK}", "-v", "source", "add", source_dir], dir=n.lightning_dir) |
| 293 | assert r.returncode == 0 |
| 294 | r = reckless([f"--network={NETWORK}", "-v", "install", "testplugpass"], dir=n.lightning_dir) |
| 295 | assert r.returncode == 0 |
| 296 | assert r.search_stdout('testplugpass enabled') |
| 297 | plugin_path = Path(n.lightning_dir) / 'reckless/testplugpass' |
| 298 | print(plugin_path) |
| 299 | assert os.path.exists(plugin_path) |
| 300 | |
| 301 | # Retry with a direct install passing the full path to the local source |
| 302 | r = reckless(['uninstall', 'testplugpass', '-v'], dir=n.lightning_dir) |
| 303 | assert not os.path.exists(plugin_path) |
| 304 | r = reckless(['source', 'remove', source_dir], dir=n.lightning_dir) |
| 305 | assert r.search_stdout('plugin source removed') |
| 306 | r = reckless(['install', '-v', source_dir], dir=n.lightning_dir) |
| 307 | assert r.search_stdout('testplugpass enabled') |
| 308 | assert os.path.exists(plugin_path) |
| 309 | |
| 310 | |
| 311 | @unittest.skipIf(VALGRIND, "virtual environment triggers memleak detection") |
nothing calls this directly
no test coverage detected