1{ lib, ... }:
2{
3 name = "homepage-dashboard";
4 meta.maintainers = with lib.maintainers; [ jnsgruk ];
5
6 nodes.machine = _: {
7 services.homepage-dashboard = {
8 enable = true;
9 settings.title = "test title rodUsEagid"; # something random/unique
10 };
11 };
12
13 testScript = ''
14 # Ensure the services are started on managed machine
15 machine.wait_for_unit("homepage-dashboard.service")
16 machine.wait_for_open_port(8082)
17 machine.succeed("curl --fail http://localhost:8082/")
18
19 # Ensure /etc/homepage-dashboard is created.
20 machine.succeed("test -d /etc/homepage-dashboard")
21
22 # Ensure that we see the custom title *only in the managed config*
23 page = machine.succeed("curl --fail http://localhost:8082/")
24 assert "test title rodUsEagid" in page, "Custom title not found"
25 '';
26}