From 41c4dd041e17d7fb0184be295f7c2e255e37f1d4 Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Mon, 8 Nov 2021 11:44:14 +0000 Subject: [PATCH] test: add rtl & cl-rest --- .cirrus.yml | 7 +++---- test/pkgs-unstable.nix | 2 ++ test/tests.nix | 11 +++++++++++ test/tests.py | 11 +++++++++++ 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index d679c0b..5f82269 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -31,10 +31,9 @@ task: - environment: scenario: netnsRegtest - # Disabled because this test is currently empty - # - name: pkgs_unstable - # environment: - # nixpkgs: nixpkgs-unstable + - name: pkgs_unstable + environment: + nixpkgs: nixpkgs-unstable # This script is run as root build_script: diff --git a/test/pkgs-unstable.nix b/test/pkgs-unstable.nix index b093fff..442bec0 100644 --- a/test/pkgs-unstable.nix +++ b/test/pkgs-unstable.nix @@ -5,6 +5,8 @@ let pkgsUnstable = with nbPkgs; [ # Disabled because joinmarket dependencies currently don't build on on unstable. # joinmarket + rtl + cl-rest ]; in pkgs.writeText "pkgs-unstable" (pkgs.lib.concatMapStringsSep "\n" toString pkgsUnstable) diff --git a/test/tests.nix b/test/tests.nix index ca924d8..9afcd97 100644 --- a/test/tests.nix +++ b/test/tests.nix @@ -59,6 +59,15 @@ let systemd.services.clightning.serviceConfig.TimeoutStopSec = 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.lnd = cfg.lnd.enable; @@ -149,6 +158,7 @@ let services.clightning.enable = true; test.features.clightningPlugins = true; + services.rtl.enable = true; services.spark-wallet.enable = true; services.lnd.enable = true; services.lnd.restOnionService.enable = true; @@ -194,6 +204,7 @@ let services.clightning.enable = true; test.features.clightningPlugins = true; services.liquidd.enable = true; + services.rtl.enable = true; services.spark-wallet.enable = true; services.lnd.enable = true; services.lightning-loop.enable = true; diff --git a/test/tests.py b/test/tests.py index 2e0a09a..af7cb81 100644 --- a/test/tests.py +++ b/test/tests.py @@ -206,6 +206,17 @@ def _(): # Test web server response 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") def _(): assert_running("spark-wallet")