test: add regtest testcase for no route failure (#3189)
This commit is contained in:
parent
ab3248da15
commit
c4c03d96a3
7 changed files with 128 additions and 53 deletions
|
|
@ -39,6 +39,17 @@ docker_lightning_unconnected_cli = [
|
|||
]
|
||||
|
||||
|
||||
docker_lightning_noroute_cli = [
|
||||
"docker",
|
||||
"exec",
|
||||
"lnbits-lnd-4-1",
|
||||
"lncli",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--rpcserver=lnd-4",
|
||||
]
|
||||
|
||||
|
||||
def run_cmd(cmd: list) -> str:
|
||||
timeout = 10
|
||||
process = Popen(cmd, stdout=PIPE, stderr=PIPE)
|
||||
|
|
@ -100,6 +111,12 @@ def get_real_invoice(sats: int) -> dict:
|
|||
return run_cmd_json(cmd)
|
||||
|
||||
|
||||
def get_real_invoice_noroute(sats: int) -> dict:
|
||||
cmd = docker_lightning_noroute_cli.copy()
|
||||
cmd.extend(["addinvoice", str(sats)])
|
||||
return run_cmd_json(cmd)
|
||||
|
||||
|
||||
def pay_real_invoice(invoice: str) -> str:
|
||||
cmd = docker_lightning_cli.copy()
|
||||
cmd.extend(["payinvoice", "--force", invoice])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue