about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/slimserver.nix16
2 files changed, 17 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 6c127efa4cea..272fe6933d63 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -750,6 +750,7 @@ in {
   signal-desktop = handleTest ./signal-desktop.nix {};
   simple = handleTest ./simple.nix {};
   sing-box = handleTest ./sing-box.nix {};
+  slimserver = handleTest ./slimserver.nix {};
   slurm = handleTest ./slurm.nix {};
   smokeping = handleTest ./smokeping.nix {};
   snapcast = handleTest ./snapcast.nix {};
diff --git a/nixos/tests/slimserver.nix b/nixos/tests/slimserver.nix
new file mode 100644
index 000000000000..09dbf20bd78a
--- /dev/null
+++ b/nixos/tests/slimserver.nix
@@ -0,0 +1,16 @@
+import ./make-test-python.nix ({ pkgs, ...} : {
+  name = "slimserver";
+  meta.maintainers = with pkgs.lib.maintainers; [ adamcstephens ];
+
+  nodes.machine = { ... }: {
+    services.slimserver.enable = true;
+  };
+
+  testScript =
+    ''
+      machine.wait_for_unit("slimserver.service")
+      machine.wait_for_open_port(9000)
+      machine.succeed("curl http://localhost:9000")
+      machine.wait_until_succeeds("journalctl -eu slimserver.service | grep 'Completed dbOptimize Scan'")
+    '';
+})