From 3df02c6c03f88bf1db14950feccb79300712fe41 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Fri, 25 Jan 2019 07:09:36 +0100 Subject: [PATCH] nixos/jackett: Add test for jackett to ensure startup --- nixos/tests/all-tests.nix | 1 + nixos/tests/jackett.nix | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 nixos/tests/jackett.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 4a7235b748b5..7bc2f3076f1e 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -107,6 +107,7 @@ in initrdNetwork = handleTest ./initrd-network.nix {}; installer = handleTest ./installer.nix {}; ipv6 = handleTest ./ipv6.nix {}; + jackett = handleTest ./jackett.nix {}; jenkins = handleTest ./jenkins.nix {}; #kafka = handleTest ./kafka.nix {}; # broken since openjdk: 8u181 -> 8u192 kerberos = handleTest ./kerberos/default.nix {}; diff --git a/nixos/tests/jackett.nix b/nixos/tests/jackett.nix new file mode 100644 index 000000000000..399a0c272327 --- /dev/null +++ b/nixos/tests/jackett.nix @@ -0,0 +1,18 @@ +import ./make-test.nix ({ lib, ... }: + +with lib; + +rec { + name = "jackett"; + meta.maintainers = with maintainers; [ etu ]; + + nodes.machine = + { pkgs, ... }: + { services.jackett.enable = true; }; + + testScript = '' + $machine->waitForUnit('jackett.service'); + $machine->waitForOpenPort('9117'); + $machine->succeed("curl --fail http://localhost:9117/"); + ''; +})