1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-09 09:36:20 +09:00
nixpkgs/nixos/tests/homepage-dashboard.nix
2025-04-04 21:16:05 +02:00

26 lines
816 B
Nix

{ lib, ... }:
{
name = "homepage-dashboard";
meta.maintainers = with lib.maintainers; [ jnsgruk ];
nodes.machine = _: {
services.homepage-dashboard = {
enable = true;
settings.title = "test title rodUsEagid"; # something random/unique
};
};
testScript = ''
# Ensure the services are started on managed machine
machine.wait_for_unit("homepage-dashboard.service")
machine.wait_for_open_port(8082)
machine.succeed("curl --fail http://localhost:8082/")
# Ensure /etc/homepage-dashboard is created.
machine.succeed("test -d /etc/homepage-dashboard")
# Ensure that we see the custom title *only in the managed config*
page = machine.succeed("curl --fail http://localhost:8082/")
assert "test title rodUsEagid" in page, "Custom title not found"
'';
}