summary refs log tree commit diff
path: root/nixos/tests/sabnzbd.nix
blob: fb35b212b493bf751c6fa81ac7724005fd2b24f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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/"
    )
  '';
})