| 2633 | |
| 2634 | |
| 2635 | def 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 | |
| 2650 | def test_config_in_subdir(node_factory, chainparams): |