MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_include

Function test_include

tests/test_misc.py:2605–2617  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

2603
2604
2605def test_include(node_factory):
2606 l1 = node_factory.get_node(start=False)
2607
2608 subdir = os.path.join(l1.daemon.opts.get("lightning-dir"), "subdir")
2609 os.makedirs(subdir)
2610 with open(os.path.join(subdir, "conf1"), 'w') as f:
2611 f.write('include conf2')
2612 with open(os.path.join(subdir, "conf2"), 'w') as f:
2613 f.write('alias=conf2')
2614 l1.daemon.opts['conf'] = os.path.join(subdir, "conf1")
2615 l1.start()
2616
2617 assert l1.rpc.listconfigs('alias')['configs']['alias'] == {'source': os.path.join(subdir, "conf2") + ":1", 'value_str': 'conf2'}
2618
2619
2620def test_config_in_subdir(node_factory, chainparams):

Callers

nothing calls this directly

Calls 6

joinMethod · 0.80
listconfigsMethod · 0.80
get_nodeMethod · 0.45
getMethod · 0.45
writeMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected