about summary refs log tree commit diff
path: root/nixos/tests/homepage-dashboard.nix
diff options
context:
space:
mode:
authorJon Seager <jon@sgrs.uk>2023-07-12 16:46:28 +0100
committerJon Seager <jon@sgrs.uk>2023-07-13 09:38:27 +0100
commitf94b38be98b9b9df4a964b019257d511f65b0c13 (patch)
tree29c449955bb11fdab81fcab70b938cd4c00d053d /nixos/tests/homepage-dashboard.nix
parent3de6be09518a97066b358da98b153a421aae8d24 (diff)
tests/homepage-dashboard: add tests for homepage
Diffstat (limited to 'nixos/tests/homepage-dashboard.nix')
-rw-r--r--nixos/tests/homepage-dashboard.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/tests/homepage-dashboard.nix b/nixos/tests/homepage-dashboard.nix
new file mode 100644
index 0000000000000..56e077f5ff6de
--- /dev/null
+++ b/nixos/tests/homepage-dashboard.nix
@@ -0,0 +1,14 @@
+import ./make-test-python.nix ({ lib, ... }: {
+  name = "homepage-dashboard";
+  meta.maintainers = with lib.maintainers; [ jnsgruk ];
+
+  nodes.machine = { pkgs, ... }: {
+    services.homepage-dashboard.enable = true;
+  };
+
+  testScript = ''
+    machine.wait_for_unit("homepage-dashboard.service")
+    machine.wait_for_open_port(8082)
+    machine.succeed("curl --fail http://localhost:8082/")
+  '';
+})