nixpkgs/nixos/tests/sabnzbd.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
718 B
Nix
Raw Normal View History

2025-05-28 11:47:24 +08:00
{ lib, ... }:
{
name = "sabnzbd";
2025-05-28 11:47:24 +08:00
meta.maintainers = with lib.maintainers; [ jojosch ];
node.pkgsReadOnly = false;
nodes.machine =
2025-05-28 11:47:24 +08:00
{ lib, ... }:
{
services.sabnzbd = {
enable = true;
2021-09-21 13:38:22 +02:00
};
# 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/"
)
_, out = machine.execute("grep SABCTools /var/lib/sabnzbd/logs/sabnzbd.log")
machine.log(out)
machine.fail("grep 'SABCTools disabled: no correct version found!' /var/lib/sabnzbd/logs/sabnzbd.log")
'';
}