Add config to enable squeak node test to cover everything (#1484)

* Add config to enable squeak node test to cover everything

* Add separate test for webadmin enabled
This commit is contained in:
Jonathan Zernik 2021-10-03 16:14:42 -07:00 committed by GitHub
parent 4fe0953f43
commit be8ebe7f42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,23 @@ def config():
dict_config={
'node': {
'network': 'mainnet'
}
},
},
)
squeaknode_config.read()
return squeaknode_config
@pytest.fixture
def config_webadmin_enabled():
squeaknode_config = SqueaknodeConfig(
dict_config={
'node': {
'network': 'mainnet'
},
'webadmin': {
'enabled': 'true'
},
},
)
squeaknode_config.read()
@ -46,3 +62,11 @@ def test_start_stop(mock_lightning_client, config):
squeak_node.start_running()
squeak_node.stop_running()
@mock.patch('squeaknode.node.squeak_node.LNDLightningClient', autospec=True)
def test_start_stop_webadmin_enabled(mock_lightning_client, config_webadmin_enabled):
squeak_node = SqueakNode(config_webadmin_enabled)
squeak_node.start_running()
squeak_node.stop_running()