test: add rtl & cl-rest

This commit is contained in:
nixbitcoin 2021-11-08 11:44:14 +00:00
parent f569227410
commit 41c4dd041e
No known key found for this signature in database
GPG Key ID: B6044ECBA2DAE5D0
4 changed files with 27 additions and 4 deletions

View File

@ -31,10 +31,9 @@ task:
- environment: - environment:
scenario: netnsRegtest scenario: netnsRegtest
# Disabled because this test is currently empty - name: pkgs_unstable
# - name: pkgs_unstable environment:
# environment: nixpkgs: nixpkgs-unstable
# nixpkgs: nixpkgs-unstable
# This script is run as root # This script is run as root
build_script: build_script:

View File

@ -5,6 +5,8 @@ let
pkgsUnstable = with nbPkgs; [ pkgsUnstable = with nbPkgs; [
# Disabled because joinmarket dependencies currently don't build on on unstable. # Disabled because joinmarket dependencies currently don't build on on unstable.
# joinmarket # joinmarket
rtl
cl-rest
]; ];
in in
pkgs.writeText "pkgs-unstable" (pkgs.lib.concatMapStringsSep "\n" toString pkgsUnstable) pkgs.writeText "pkgs-unstable" (pkgs.lib.concatMapStringsSep "\n" toString pkgsUnstable)

View File

@ -59,6 +59,15 @@ let
systemd.services.clightning.serviceConfig.TimeoutStopSec = systemd.services.clightning.serviceConfig.TimeoutStopSec =
mkIf config.services.clightning.plugins.clboss.enable "500ms"; mkIf config.services.clightning.plugins.clboss.enable "500ms";
tests.rtl = cfg.rtl.enable;
services.rtl.nodes.lnd = mkDefault true;
services.rtl.nodes.clightning = mkDefault true;
services.rtl.loop = mkIf cfg.rtl.nodes.lnd (mkDefault true);
# Use a simple, non-random password for manual web interface tests
nix-bitcoin.generateSecretsCmds.rtl = mkIf cfg.rtl.enable (mkForce ''
echo a > rtl-password
'');
tests.spark-wallet = cfg.spark-wallet.enable; tests.spark-wallet = cfg.spark-wallet.enable;
tests.lnd = cfg.lnd.enable; tests.lnd = cfg.lnd.enable;
@ -149,6 +158,7 @@ let
services.clightning.enable = true; services.clightning.enable = true;
test.features.clightningPlugins = true; test.features.clightningPlugins = true;
services.rtl.enable = true;
services.spark-wallet.enable = true; services.spark-wallet.enable = true;
services.lnd.enable = true; services.lnd.enable = true;
services.lnd.restOnionService.enable = true; services.lnd.restOnionService.enable = true;
@ -194,6 +204,7 @@ let
services.clightning.enable = true; services.clightning.enable = true;
test.features.clightningPlugins = true; test.features.clightningPlugins = true;
services.liquidd.enable = true; services.liquidd.enable = true;
services.rtl.enable = true;
services.spark-wallet.enable = true; services.spark-wallet.enable = true;
services.lnd.enable = true; services.lnd.enable = true;
services.lightning-loop.enable = true; services.lightning-loop.enable = true;

View File

@ -206,6 +206,17 @@ def _():
# Test web server response # Test web server response
assert_matches(f"curl -L {ip('btcpayserver')}:23000", "Welcome to your BTCPay Server") assert_matches(f"curl -L {ip('btcpayserver')}:23000", "Welcome to your BTCPay Server")
@test("rtl")
def _():
assert_running("rtl")
machine.wait_until_succeeds(
log_has_string("rtl", "Server is up and running")
)
assert_running("cl-rest")
machine.wait_until_succeeds(
log_has_string("cl-rest", "cl-rest api server is ready and listening on port: 3001")
)
@test("spark-wallet") @test("spark-wallet")
def _(): def _():
assert_running("spark-wallet") assert_running("spark-wallet")