core-lightning/tests
Rusty Russell 5f664dac77 pytest: fix flake in test_excluded_adjacent_routehint
Wait to be sure l1->l2 is ready.  And use the same pattern for l2->l3.

```
    def test_excluded_adjacent_routehint(node_factory, bitcoind):
        """Test case where we try have a routehint which leads to an adjacent
        node, but the result exceeds our maxfee; we crashed trying to find
        what part of the path was most expensive in that case
    
        """
        l1, l2, l3 = node_factory.line_graph(3)
    
        # We'll be forced to use routehint, since we don't know about l3.
        wait_for(lambda: len(l3.rpc.listchannels(source=l2.info['id'])['channels']) == 1)
        inv = l3.rpc.invoice(10**3, "lbl", "desc", exposeprivatechannels=l2.get_channel_scid(l3))
    
        # This will make it reject the routehint.
        err = r'Fee exceeds our fee budget: 1msat > 0msat, discarding route'
        with pytest.raises(RpcError, match=err):
>           l1.rpc.pay(bolt11=inv['bolt11'], maxfeepercent=0, exemptfee=0)

tests/test_pay.py:3420: 
...
>           raise RpcError(method, payload, resp['error'])
E           pyln.client.lightning.RpcError: RPC call failed: method: pay, payload: {'bolt11': 'lnbcrt10n1pjntczasp59x0weqkg4u9amd364yaeyw6rmgnmf9qtra6epylcntvt65yalpzspp5x8wgtmjhq33qruk6mmhutyr7w74xxjhct7v9tppel0t9p4rtautsdq8v3jhxccxqyjw5qcqp9rzjqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4jqqqvuqqqqgqqqqqqqqpqqqqqzsqqc9qxpqysgq4euy2qyzl2nufpxv6ahf0s5zry0h5dgrpa5adwu4swrdvjw7qe48cj8kp5fl7k20ex0x3dnk6e8xk5jp82snrdcr6he7eyqd0wrmvlgqwe5nma', 'maxfeepercent': 0, 'exemptfee': 0}, error: {'code': 210, 'message': 'Destination 035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d is not reachable directly and all routehints were unusable.', 'attempts': [{'status': 'failed', 'failreason': 'Destination 035d2b1192dfba134e10e540875d366ebc8bc353d5aa766b80c090b39c3a5d885d is not reachable directly and all routehints were unusable.', 'partid': 0, 'amount_msat': 1000msat}]}
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-24 10:02:52 +02:00
..
data db: migrate old runes table to fix up id fields. 2023-08-31 05:33:15 +09:30
fuzz fuzz: new bolt11 seeds 2023-10-24 12:17:18 +10:30
plugins pytest: test for accepting even unknown messages. 2023-10-24 11:50:57 +10:30
vectors pytest: Remove onion test vectors containing legacy onions. 2022-03-18 09:20:11 +10:30
benchmark.py pytest: always provide payment_secret when making payments. 2021-07-14 14:38:00 -05:00
conftest.py pytest: use --developer instead of environment variable. 2023-09-21 20:08:24 +09:30
db.py test-db-provider: if postgres in tests, startup a bookkeeper db 2022-07-28 12:08:18 +09:30
fixtures.py pytest: use --developer instead of environment variable. 2023-09-21 20:08:24 +09:30
rkls_github_canned_server.py pytest: add blackbox tests for reckless 2023-04-09 12:41:11 +09:30
test_bookkeeper.py pytest: wean many tests off the assumption that listchannels shows private channels. 2023-10-04 08:02:33 +10:30
test_cln_rs.py pytest: test that cln-grpc certificates are not generated when cln-grpc is not started. 2023-10-13 10:25:36 +02:00
test_closing.py pyln-testing: make disconnects continue after restart. 2023-10-23 15:48:50 +10:30
test_connection.py lightningd: let channeld/dual_openingd send error to peer. 2023-10-23 15:48:50 +10:30
test_db.py pytest: use --developer instead of environment variable. 2023-09-21 20:08:24 +09:30
test_gossip.py pytest: wean many tests off the assumption that listchannels shows private channels. 2023-10-04 08:02:33 +10:30
test_invoices.py pytest: use --developer instead of environment variable. 2023-09-21 20:08:24 +09:30
test_misc.py pytest: fix flake in test_listforwards_and_listhtlcs 2023-10-24 10:02:52 +02:00
test_mkfunding.py pytest: add tests for devtools/mkfunding 2023-01-09 14:50:30 -06:00
test_onion.py lightningd: remove support for legacy onion format. 2022-03-18 09:20:11 +10:30
test_opening.py lightningd: split DUALOPEND_OPEN_INIT into DUALOPEND_OPEN_INIT and DUALOPEND_OPEN_COMMITTED. 2023-10-02 11:41:19 +10:30
test_pay.py pytest: fix flake in test_excluded_adjacent_routehint 2023-10-24 10:02:52 +02:00
test_plugin.py lightningd: don't process request twice if plugin dies. 2023-10-24 15:07:08 +10:30
test_reckless.py pytest: add reckless local install test 2023-07-27 06:53:49 +09:30
test_renepay.py pytest: use --developer instead of environment variable. 2023-09-21 20:08:24 +09:30
test_runes.py pytest: correctly test missing method for runes. 2023-10-17 14:58:40 +10:30
test_splicing.py addpsbtoutput: New onchain command for PSBT output 2023-10-03 10:12:39 +02:00
test_wallet.py addpsbtoutput: New onchain command for PSBT output 2023-10-03 10:12:39 +02:00
utils.py pytest: use --developer instead of environment variable. 2023-09-21 20:08:24 +09:30
valgrind-suppressions.txt pytest: Use valgrind target suppressions instead of skipping tests 2022-03-10 10:21:41 +10:30