tests: disable `btcpayserver.lbtc` for regtest

Previously, in case of btcpayserver.lbtc on regtest, nbxplorer just
printed a log error while trying to generate liquidd regtest blocks.
Now nbxplorer exits with an error, so disable lbtc.
This commit is contained in:
Erik Arvstedt 2022-04-30 15:35:47 +02:00 committed by Jonas Nick
parent 7de56b019f
commit aa21fb454e
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
2 changed files with 17 additions and 7 deletions

View File

@ -95,6 +95,7 @@ let
};
# Needed to test macaroon creation
environment.systemPackages = mkIfTest "btcpayserver" (with pkgs; [ openssl xxd ]);
test.data.btcpayserver-lbtc = config.services.btcpayserver.lbtc;
tests.joinmarket = cfg.joinmarket.enable;
tests.joinmarket-yieldgenerator = cfg.joinmarket.yieldgenerator.enable;
@ -264,6 +265,21 @@ let
# `validatepegin` is incompatible with regtest
services.liquidd.validatepegin = mkForce false;
# TODO-EXTERNAL:
# Reenable `btcpayserver.lbtc` in regtest (and add test in tests.py)
# when nbxplorer can parse liquidd regtest blocks.
#
# When `btcpayserver.lbtc` is enabled in regtest, nxbplorer tries to
# generate regtest blocks, which fails because no liquidd wallet exists.
# When blocks are pre-generated via `liquidd.postStart`, nbxplorer
# fails to parse the blocks:
# info: NBXplorer.Indexer.LBTC: Full node version detected: 210002
# info: NBXplorer.Indexer.LBTC: NBXplorer is correctly whitelisted by the node
# fail: NBXplorer.Indexer.LBTC: Unhandled exception in the indexer, retrying in 10 seconds
# System.IO.EndOfStreamException: No more byte to read
# at NBitcoin.BitcoinStream.ReadWriteBytes(Span`1 data)
services.btcpayserver.lbtc = mkForce false;
};
## Examples / debug helper

View File

@ -188,7 +188,7 @@ def _():
def _():
assert_running("nbxplorer")
machine.wait_until_succeeds(log_has_string("nbxplorer", "BTC: RPC connection successful"))
if "liquidd" in enabled_tests:
if test_data["btcpayserver-lbtc"]:
machine.wait_until_succeeds(log_has_string("nbxplorer", "LBTC: RPC connection successful"))
wait_for_open_port(ip("nbxplorer"), 24444)
@ -399,12 +399,6 @@ def _():
succeed("runuser -u operator -- pool orders list")
if enabled("btcpayserver"):
machine.wait_until_succeeds(log_has_string("nbxplorer", f"BTC: Starting scan at block {num_blocks}"))
# TODO-EXTERNAL:
# nbxplorer 2.2.16 currently fails with with lbtc (liquidd) on regtest
# LBTC: Full node version detected: 210000
# LBTC: RPC connection successful
# LBTC: Failed to connect to RPC
# System.IO.EndOfStreamException: No more byte to read
if "netns-isolation" in enabled_tests:
def ip(name):