mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 18:57:06 +01:00
pytest: more testing for local socket addresses.
In particular, the assert when `--addr=/sockname` is used, and that it doesn't clean up on restart, requiring manual deletion of the socket. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
b60b09a2ca
commit
32215177fe
1 changed files with 11 additions and 0 deletions
|
@ -566,6 +566,7 @@ def test_io_logging(node_factory, executor):
|
||||||
assert any(l['type'] == 'IO_IN' for l in peerlog)
|
assert any(l['type'] == 'IO_IN' for l in peerlog)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.xfail(strict=True)
|
||||||
def test_address(node_factory):
|
def test_address(node_factory):
|
||||||
if DEVELOPER:
|
if DEVELOPER:
|
||||||
opts = {'dev-allow-localhost': None}
|
opts = {'dev-allow-localhost': None}
|
||||||
|
@ -595,6 +596,16 @@ def test_address(node_factory):
|
||||||
l2 = node_factory.get_node()
|
l2 = node_factory.get_node()
|
||||||
l2.rpc.connect(l1.info['id'], l1.daemon.opts['bind-addr'])
|
l2.rpc.connect(l1.info['id'], l1.daemon.opts['bind-addr'])
|
||||||
|
|
||||||
|
# 'addr' with local socket works too.
|
||||||
|
l1.stop()
|
||||||
|
del l1.daemon.opts['bind-addr']
|
||||||
|
l1.daemon.opts['addr'] = os.path.join(l1.daemon.lightning_dir, "sock")
|
||||||
|
# start expects a port, so we open-code here.
|
||||||
|
l1.daemon.start()
|
||||||
|
|
||||||
|
l2 = node_factory.get_node()
|
||||||
|
l2.rpc.connect(l1.info['id'], l1.daemon.opts['addr'])
|
||||||
|
|
||||||
|
|
||||||
def test_listconfigs(node_factory, bitcoind):
|
def test_listconfigs(node_factory, bitcoind):
|
||||||
l1 = node_factory.get_node()
|
l1 = node_factory.get_node()
|
||||||
|
|
Loading…
Add table
Reference in a new issue