1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00
nixpkgs/nixos/tests/homebox.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
631 B
Nix
Raw Normal View History

2024-06-15 14:25:40 +01:00
import ./make-test-python.nix (
{ pkgs, ... }:
let
port = "7745";
in
{
name = "homebox";
meta = with pkgs.lib.maintainers; {
maintainers = [ patrickdag ];
};
nodes.machine = {
services.homebox = {
enable = true;
settings.HBOX_WEB_PORT = port;
};
};
testScript = ''
machine.wait_for_unit("homebox.service")
machine.wait_for_open_port(${port})
machine.succeed("curl --fail -X GET 'http://localhost:${port}/'")
out = machine.succeed("curl --fail 'http://localhost:${port}/api/v1/status'")
assert '"health":true' in out
'';
}
)