nixos/sonarr: Add test for sonarr to ensure startup

This commit is contained in:
Elis Hirwing 2019-01-24 23:08:16 +01:00
parent 8dff3214b7
commit 8be2345baf
No known key found for this signature in database
GPG key ID: D57EFA625C9A925F
2 changed files with 19 additions and 0 deletions

View file

@ -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 {};

18
nixos/tests/sonarr.nix Normal file
View file

@ -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/");
'';
})