at 23.11-beta 731 B view raw
1import ./make-test-python.nix ({ pkgs, lib, ... }: { 2 name = "sabnzbd"; 3 meta = with pkgs.lib; { 4 maintainers = with maintainers; [ jojosch ]; 5 }; 6 7 nodes.machine = { pkgs, ... }: { 8 services.sabnzbd = { 9 enable = true; 10 }; 11 12 # unrar is unfree 13 nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "unrar" ]; 14 }; 15 16 testScript = '' 17 machine.wait_for_unit("sabnzbd.service") 18 machine.wait_until_succeeds( 19 "curl --fail -L http://localhost:8080/" 20 ) 21 _, out = machine.execute("grep SABCTools /var/lib/sabnzbd/logs/sabnzbd.log") 22 machine.log(out) 23 machine.fail("grep 'SABCTools disabled: no correct version found!' /var/lib/sabnzbd/logs/sabnzbd.log") 24 ''; 25})