about summary refs log tree commit diff
path: root/nixos/tests/jackett.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/tests/jackett.nix')
-rw-r--r--nixos/tests/jackett.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/nixos/tests/jackett.nix b/nixos/tests/jackett.nix
index bc8b724e8b4b..4e65cb61d17a 100644
--- a/nixos/tests/jackett.nix
+++ b/nixos/tests/jackett.nix
@@ -1,17 +1,21 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-{
+let
+  jackettPort = 9117;
+in {
   name = "jackett";
   meta.maintainers = with lib.maintainers; [ etu ];
 
   nodes.machine =
-    { pkgs, ... }:
-    { services.jackett.enable = true; };
+    { pkgs, ... }: {
+      services.jackett.enable = true;
+      services.jackett.port = jackettPort;
+    };
 
   testScript = ''
     machine.start()
     machine.wait_for_unit("jackett.service")
-    machine.wait_for_open_port(9117)
-    machine.succeed("curl --fail http://localhost:9117/")
+    machine.wait_for_open_port(${toString jackettPort})
+    machine.succeed("curl --fail http://localhost:${toString jackettPort}/")
   '';
 })