| 2603 | |
| 2604 | |
| 2605 | def 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 | |
| 2620 | def test_config_in_subdir(node_factory, chainparams): |