Files
nixpkgs/nixos/tests/homebox.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

42 lines
917 B
Nix

{ pkgs, ... }:
let
port = "7745";
in
{
name = "homebox";
meta = with pkgs.lib.maintainers; {
maintainers = [ patrickdag ];
};
nodes =
let
self = {
simple = {
services.homebox = {
enable = true;
settings.HBOX_WEB_PORT = port;
};
};
postgres = {
imports = [ self.simple ];
services.homebox.database.createLocally = true;
};
};
in
self;
testScript = ''
def test_homebox(node):
node.wait_for_unit("homebox.service")
node.wait_for_open_port(${port})
node.succeed("curl --fail -X GET 'http://localhost:${port}/'")
out = node.succeed("curl --fail 'http://localhost:${port}/api/v1/status'")
assert '"health":true' in out
test_homebox(simple)
simple.send_monitor_command("quit")
simple.wait_for_shutdown()
test_homebox(postgres)
'';
}