2022-07-08 08:51:21 +00:00
|
|
|
{ pkgs, makeTest, inputs }:
|
|
|
|
makeTest {
|
|
|
|
nodes = {
|
|
|
|
client = { config, pkgs, ... }: {
|
|
|
|
environment.systemPackages = [ pkgs.curl ];
|
|
|
|
};
|
|
|
|
lnbits = { ... }: {
|
2022-07-14 04:27:38 +00:00
|
|
|
imports = [ inputs.self.nixosModules.default ];
|
2022-07-08 08:51:21 +00:00
|
|
|
services.lnbits = {
|
|
|
|
enable = true;
|
|
|
|
openFirewall = true;
|
|
|
|
host = "0.0.0.0";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
testScript = { nodes, ... }: ''
|
|
|
|
start_all()
|
|
|
|
lnbits.wait_for_open_port(${toString nodes.lnbits.config.services.lnbits.port})
|
|
|
|
client.wait_for_unit("multi-user.target")
|
|
|
|
with subtest("Check that the lnbits webserver can be reached."):
|
|
|
|
assert "<title>LNbits</title>" in client.succeed(
|
|
|
|
"curl -sSf http:/lnbits:8231/ | grep title"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
}
|