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

Function test_include

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

Source from the content-addressed store, hash-verified

2633
2634
2635def test_include(node_factory):
2636 l1 = node_factory.get_node(start=False)
2637
2638 subdir = os.path.join(l1.daemon.opts.get("lightning-dir"), "subdir")
2639 os.makedirs(subdir)
2640 with open(os.path.join(subdir, "conf1"), 'w') as f:
2641 f.write('include conf2')
2642 with open(os.path.join(subdir, "conf2"), 'w') as f:
2643 f.write('alias=conf2')
2644 l1.daemon.opts['conf'] = os.path.join(subdir, "conf1")
2645 l1.start()
2646
2647 assert l1.rpc.listconfigs('alias')['configs']['alias'] == {'source': os.path.join(subdir, "conf2") + ":1", 'value_str': 'conf2'}
2648
2649
2650def 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