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

Function test_listconfigs

tests/test_misc.py:850–876  ·  view source on GitHub ↗
(node_factory, bitcoind, chainparams)

Source from the content-addressed store, hash-verified

848
849
850def test_listconfigs(node_factory, bitcoind, chainparams):
851 # Make extremely long entry, check it works
852 for deprecated in (True, False):
853 l1 = node_factory.get_node(options={'log-prefix': 'lightning1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
854 'allow-deprecated-apis': deprecated,
855 'wumbo': None})
856
857 configs = l1.rpc.listconfigs()['configs']
858 # See utils.py for these values
859 for name, valfield, val in (('allow-deprecated-apis', 'value_bool', deprecated),
860 ('network', 'value_str', chainparams['name']),
861 ('ignore-fee-limits', 'value_bool', False),
862 ('log-prefix', 'value_str', 'lightning1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')):
863 c = configs[name]
864 assert c['source'] == 'cmdline'
865 assert c[valfield] == val
866 assert 'plugin' not in c
867
868 # We don't print the (unofficial!) wumbo
869 assert 'wumbo' not in configs
870 assert configs['large-channels']['set'] is True
871 assert configs['large-channels']['source'] == 'cmdline'
872
873 # Test modern ones!
874 for c in configs.keys():
875 oneconfig = l1.rpc.listconfigs(config=c)['configs']
876 assert oneconfig[c] == configs[c]
877
878
879def test_listconfigs_plugins(node_factory, bitcoind, chainparams):

Callers

nothing calls this directly

Calls 2

listconfigsMethod · 0.80
get_nodeMethod · 0.45

Tested by

no test coverage detected