test that partial/substring search returns multiple matches
(node_factory)
| 225 | |
| 226 | |
| 227 | def test_search_partial_match(node_factory): |
| 228 | """test that partial/substring search returns multiple matches""" |
| 229 | n = get_reckless_node(node_factory) |
| 230 | |
| 231 | # Search for partial name "testplug" - should find all test plugins |
| 232 | r = reckless([f"--network={NETWORK}", "search", "testplug"], dir=n.lightning_dir) |
| 233 | # Should show the "Plugins matching" header |
| 234 | assert r.search_stdout("Plugins matching 'testplug':") |
| 235 | # Should list multiple plugins (all start with "testplug") |
| 236 | assert r.search_stdout('testplugpass') |
| 237 | assert r.search_stdout('testplugfail') |
| 238 | assert r.search_stdout('testplugpyproj') |
| 239 | assert r.search_stdout('testpluguv') |
| 240 | |
| 241 | # Search for "pass" - should find testplugpass |
| 242 | r = reckless([f"--network={NETWORK}", "search", "pass"], dir=n.lightning_dir) |
| 243 | assert r.search_stdout("Plugins matching 'pass':") |
| 244 | assert r.search_stdout('testplugpass') |
| 245 | # Should not find plugins without "pass" in name |
| 246 | assert not r.search_stdout('testplugfail') |
| 247 | |
| 248 | # Search for something that doesn't exist |
| 249 | r = reckless([f"--network={NETWORK}", "search", "nonexistent"], dir=n.lightning_dir) |
| 250 | assert r.search_stdout("Search exhausted all sources") |
| 251 | |
| 252 | |
| 253 | def test_install(node_factory): |
nothing calls this directly
no test coverage detected