mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
nixosTest.homebox: init
This commit is contained in:
parent
f8639ea08d
commit
ea4107aba0
@ -420,6 +420,7 @@ in {
|
||||
hddfancontrol = handleTest ./hddfancontrol.nix {};
|
||||
hedgedoc = handleTest ./hedgedoc.nix {};
|
||||
herbstluftwm = handleTest ./herbstluftwm.nix {};
|
||||
homebox = handleTest ./homebox.nix {};
|
||||
homepage-dashboard = handleTest ./homepage-dashboard.nix {};
|
||||
honk = runTest ./honk.nix;
|
||||
installed-tests = pkgs.recurseIntoAttrs (handleTest ./installed-tests {});
|
||||
|
26
nixos/tests/homebox.nix
Normal file
26
nixos/tests/homebox.nix
Normal file
@ -0,0 +1,26 @@
|
||||
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
|
||||
'';
|
||||
}
|
||||
)
|
Loading…
Reference in New Issue
Block a user