diff options
author | Elis Hirwing <elis@hirwing.se> | 2019-01-24 23:08:16 +0100 |
---|---|---|
committer | Elis Hirwing <elis@hirwing.se> | 2019-01-25 07:10:40 +0100 |
commit | 8be2345baf4ae0ba6681061ec0766e83dcac6282 (patch) | |
tree | b197fe78cf7b9eb2dd86cfe1bda564eae4f4fbac | |
parent | 8dff3214b7e08b5addaa5898d3dabbd8f24dfdcb (diff) | |
download | nixpkgs-8be2345baf4ae0ba6681061ec0766e83dcac6282.tar nixpkgs-8be2345baf4ae0ba6681061ec0766e83dcac6282.tar.gz nixpkgs-8be2345baf4ae0ba6681061ec0766e83dcac6282.tar.bz2 nixpkgs-8be2345baf4ae0ba6681061ec0766e83dcac6282.tar.lz nixpkgs-8be2345baf4ae0ba6681061ec0766e83dcac6282.tar.xz nixpkgs-8be2345baf4ae0ba6681061ec0766e83dcac6282.tar.zst nixpkgs-8be2345baf4ae0ba6681061ec0766e83dcac6282.zip |
nixos/sonarr: Add test for sonarr to ensure startup
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/sonarr.nix | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8c2df2435a7..7555fabf858 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -194,6 +194,7 @@ in smokeping = handleTest ./smokeping.nix {}; snapper = handleTest ./snapper.nix {}; solr = handleTest ./solr.nix {}; + sonarr = handleTest ./sonarr.nix {}; strongswan-swanctl = handleTest ./strongswan-swanctl.nix {}; sudo = handleTest ./sudo.nix {}; switchTest = handleTest ./switch-test.nix {}; diff --git a/nixos/tests/sonarr.nix b/nixos/tests/sonarr.nix new file mode 100644 index 00000000000..3d5c3b19b6e --- /dev/null +++ b/nixos/tests/sonarr.nix @@ -0,0 +1,18 @@ +import ./make-test.nix ({ lib, ... }: + +with lib; + +rec { + name = "sonarr"; + meta.maintainers = with maintainers; [ etu ]; + + nodes.machine = + { pkgs, ... }: + { services.sonarr.enable = true; }; + + testScript = '' + $machine->waitForUnit('sonarr.service'); + $machine->waitForOpenPort('8989'); + $machine->succeed("curl --fail http://localhost:8989/"); + ''; +}) |