sabnzbd: add simple test

main
Johannes Schleifenbaum 3 years ago committed by Bjørn Forsman
parent 12efd19b16
commit 9f45c18515
  1. 1
      nixos/tests/all-tests.nix
  2. 22
      nixos/tests/sabnzbd.nix
  3. 5
      pkgs/servers/sabnzbd/default.nix

@ -408,6 +408,7 @@ in
rss2email = handleTest ./rss2email.nix {};
rsyslogd = handleTest ./rsyslogd.nix {};
rxe = handleTest ./rxe.nix {};
sabnzbd = handleTest ./sabnzbd.nix {};
samba = handleTest ./samba.nix {};
samba-wsdd = handleTest ./samba-wsdd.nix {};
sanoid = handleTest ./sanoid.nix {};

@ -0,0 +1,22 @@
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "sabnzbd";
meta = with pkgs.lib; {
maintainers = with maintainers; [ jojosch ];
};
machine = { pkgs, ... }: {
services.sabnzbd = {
enable = true;
};
# unrar is unfree
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "unrar" ];
};
testScript = ''
machine.wait_for_unit("sabnzbd.service")
machine.wait_until_succeeds(
"curl --fail -L http://localhost:8080/"
)
'';
})

@ -6,6 +6,7 @@
, unrar
, p7zip
, makeWrapper
, nixosTests
}:
let
@ -48,6 +49,10 @@ in stdenv.mkDerivation rec {
runHook postInstall
'';
passthru.tests = {
smoke-test = nixosTests.sabnzbd;
};
meta = with lib; {
description = "Usenet NZB downloader, par2 repairer and auto extracting server";
homepage = "https://sabnzbd.org";

Loading…
Cancel
Save