2021-09-21 13:38:22 +02:00
|
|
|
import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
|
|
|
name = "sabnzbd";
|
|
|
|
meta = with pkgs.lib; {
|
|
|
|
maintainers = with maintainers; [ jojosch ];
|
|
|
|
};
|
|
|
|
|
2022-03-21 00:15:30 +01:00
|
|
|
nodes.machine = { pkgs, ... }: {
|
2021-09-21 13:38:22 +02:00
|
|
|
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/"
|
|
|
|
)
|
2023-10-11 14:44:40 +02:00
|
|
|
_, 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")
|
2021-09-21 13:38:22 +02:00
|
|
|
'';
|
|
|
|
})
|