Skip to content

Commit

Permalink
pytest: Make sure the channels entries don't get deleted anymore
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Decker <@cdecker>
  • Loading branch information
cdecker committed Jun 22, 2019
1 parent 4773c57 commit e420c94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_closing.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def test_closing(node_factory, bitcoind):
wait_for(lambda: len(l1.rpc.listchannels()['channels']) == 0)
wait_for(lambda: len(l2.rpc.listchannels()['channels']) == 0)

# The entry in the channels table should still be there
assert l1.db_query("SELECT count(*) as c FROM channels;")[0]['c'] == 1
assert l2.db_query("SELECT count(*) as c FROM channels;")[0]['c'] == 1


def test_closing_while_disconnected(node_factory, bitcoind):
l1, l2 = node_factory.line_graph(2, opts={'may_reconnect': True})
Expand Down
4 changes: 4 additions & 0 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,10 @@ def test_forget_channel(node_factory):
l1.restart()
assert len(l1.rpc.listpeers()['peers']) == 0

# The entry in the channels table should still be there
assert l1.db_query("SELECT count(*) as c FROM channels;")[0]['c'] == 1
assert l2.db_query("SELECT count(*) as c FROM channels;")[0]['c'] == 1


def test_peerinfo(node_factory, bitcoind):
l1, l2 = node_factory.line_graph(2, fundchannel=False, opts={'may_reconnect': True})
Expand Down

0 comments on commit e420c94

Please sign in to comment.