summary refs log tree commit diff
path: root/nixos/tests/audiobookshelf.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/audiobookshelf.nix')
-rw-r--r--nixos/tests/audiobookshelf.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/nixos/tests/audiobookshelf.nix b/nixos/tests/audiobookshelf.nix
new file mode 100644
index 00000000000..64bd415160e
--- /dev/null
+++ b/nixos/tests/audiobookshelf.nix
@@ -0,0 +1,23 @@
+import ./make-test-python.nix ({ lib, ... }:
+
+with lib;
+
+{
+  name = "audiobookshelf";
+  meta.maintainers = with maintainers; [ wietsedv ];
+
+  nodes.machine =
+    { pkgs, ... }:
+    {
+      services.audiobookshelf = {
+        enable = true;
+        port = 1234;
+      };
+    };
+
+  testScript = ''
+    machine.wait_for_unit("audiobookshelf.service")
+    machine.wait_for_open_port(1234)
+    machine.succeed("curl --fail http://localhost:1234/")
+  '';
+})