Browse Source

pytest: check that --daemon still means we recognize our own children.

We create our children then fork, so we're not a parent.  I noticed this
because 'lightning-cli stop' takes a long time: this is because it tries to
wait for them and they don't respond.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
pull/2938/head
Rusty Russell 6 years ago
committed by Christian Decker
parent
commit
fc024f81d6
  1. 5
      tests/test_misc.py

5
tests/test_misc.py

@ -659,6 +659,7 @@ def test_cli(node_factory):
assert only_one(j['invoices'])['label'] == 'l"[]{}'
@pytest.mark.xfail(strict=True)
def test_daemon_option(node_factory):
"""
Make sure --daemon at least vaguely works!
@ -683,6 +684,10 @@ def test_daemon_option(node_factory):
'--lightning-dir={}'.format(l1.daemon.lightning_dir),
'stop'], check=True)
# It should not complain that subdaemons aren't children.
with open('{}/log-daemon'.format(l1.daemon.lightning_dir), 'r') as f:
assert 'No child process' not in f.read()
@flaky
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1")

Loading…
Cancel
Save