Skip to content

Commit 99f02b3

Browse files
committed
test_reckless: Added test for plugins with required options
1 parent 23ef15c commit 99f02b3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_reckless.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,20 @@ def test_tag_install(node_factory):
432432
header = line
433433

434434

435+
def test_install_plugin_requiring_opts(node_factory):
436+
"""A plugin that exits non-zero when run standalone (e.g. because a
437+
required option is not yet configured) should still install successfully."""
438+
n = get_reckless_node(node_factory)
439+
r = reckless([f"--network={NETWORK}", "-v", "install", "testplugreqopts"],
440+
dir=n.lightning_dir)
441+
assert r.returncode == 0
442+
assert r.search_stdout('plugin installed:')
443+
assert r.search_stdout('testplugreqopts enabled')
444+
assert r.search_stdout('may require options')
445+
plugin_path = Path(n.lightning_dir) / 'reckless/testplugreqopts'
446+
assert plugin_path.exists()
447+
448+
435449
# Note: uv timeouts from the GH network seem to happen?
436450
@pytest.mark.slow_test
437451
@unittest.skipIf(VALGRIND, "node too slow for starting plugin under valgrind")

0 commit comments

Comments
 (0)