pytest: test reckless direct install
This commit is contained in:
committed by
Rusty Russell
parent
1401484ba0
commit
785fcc1af5
@@ -235,9 +235,8 @@ def test_local_dir_install(node_factory):
|
||||
"""Test search and install from local directory source."""
|
||||
n = get_reckless_node(node_factory)
|
||||
n.start()
|
||||
r = reckless([f"--network={NETWORK}", "-v", "source", "add",
|
||||
os.path.join(n.lightning_dir, '..', 'lightningd', 'testplugpass')],
|
||||
dir=n.lightning_dir)
|
||||
source_dir = str(Path(n.lightning_dir / '..' / 'lightningd' / 'testplugpass').resolve())
|
||||
r = reckless([f"--network={NETWORK}", "-v", "source", "add", source_dir], dir=n.lightning_dir)
|
||||
assert r.returncode == 0
|
||||
r = reckless([f"--network={NETWORK}", "-v", "install", "testplugpass"], dir=n.lightning_dir)
|
||||
assert r.returncode == 0
|
||||
@@ -246,6 +245,15 @@ def test_local_dir_install(node_factory):
|
||||
print(plugin_path)
|
||||
assert os.path.exists(plugin_path)
|
||||
|
||||
# Retry with a direct install passing the full path to the local source
|
||||
r = reckless(['uninstall', 'testplugpass', '-v'], dir=n.lightning_dir)
|
||||
assert not os.path.exists(plugin_path)
|
||||
r = reckless(['source', 'remove', source_dir], dir=n.lightning_dir)
|
||||
assert 'plugin source removed' in r.stdout
|
||||
r = reckless(['install', '-v', source_dir], dir=n.lightning_dir)
|
||||
assert 'testplugpass enabled' in r.stdout
|
||||
assert os.path.exists(plugin_path)
|
||||
|
||||
|
||||
@unittest.skipIf(VALGRIND, "virtual environment triggers memleak detection")
|
||||
def test_disable_enable(node_factory):
|
||||
|
||||
Reference in New Issue
Block a user