mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
sabnzbd: add simple test
This commit is contained in:
parent
12efd19b16
commit
9f45c18515
@ -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 {};
|
||||
|
22
nixos/tests/sabnzbd.nix
Normal file
22
nixos/tests/sabnzbd.nix
Normal file
@ -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…
Reference in New Issue
Block a user