From ddcb2c473d41ebc78e00eb61458b5ead9bd187ca Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Thu, 24 Jan 2019 23:09:21 +0100 Subject: [PATCH] nixos/radarr: Add test for radarr to ensure startup --- nixos/tests/all-tests.nix | 1 + nixos/tests/radarr.nix | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 nixos/tests/radarr.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 7555fabf858e..d679c4e6e068 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -178,6 +178,7 @@ in quagga = handleTest ./quagga.nix {}; quake3 = handleTest ./quake3.nix {}; rabbitmq = handleTest ./rabbitmq.nix {}; + radarr = handleTest ./radarr.nix {}; radicale = handleTest ./radicale.nix {}; redmine = handleTest ./redmine.nix {}; roundcube = handleTest ./roundcube.nix {}; diff --git a/nixos/tests/radarr.nix b/nixos/tests/radarr.nix new file mode 100644 index 000000000000..6b9a909e44b5 --- /dev/null +++ b/nixos/tests/radarr.nix @@ -0,0 +1,18 @@ +import ./make-test.nix ({ lib, ... }: + +with lib; + +rec { + name = "radarr"; + meta.maintainers = with maintainers; [ etu ]; + + nodes.machine = + { pkgs, ... }: + { services.radarr.enable = true; }; + + testScript = '' + $machine->waitForUnit('radarr.service'); + $machine->waitForOpenPort('7878'); + $machine->succeed("curl --fail http://localhost:7878/"); + ''; +})