1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 00:54:46 +00:00
nixpkgs/nixos/tests/nzbget.nix
Dominik Xaver Hörl 25bef2d8f9 treewide: simplify pkgs.stdenv.lib -> pkgs.lib
The library does not depend on stdenv, that `stdenv` exposes `lib` is
an artifact of the ancient origins of nixpkgs.
2021-01-10 20:12:06 +01:00

31 lines
842 B
Nix

import ./make-test-python.nix ({ pkgs, ...} : {
name = "nzbget";
meta = with pkgs.lib.maintainers; {
maintainers = [ aanderse flokli ];
};
nodes = {
server = { ... }: {
services.nzbget.enable = true;
# hack, don't add (unfree) unrar to nzbget's path,
# so we can run this test in CI
systemd.services.nzbget.path = pkgs.lib.mkForce [ pkgs.p7zip ];
};
};
testScript = ''
start_all()
server.wait_for_unit("nzbget.service")
server.wait_for_unit("network.target")
server.wait_for_open_port(6789)
assert "This file is part of nzbget" in server.succeed(
"curl -f -s -u nzbget:tegbzn6789 http://127.0.0.1:6789"
)
server.succeed(
"${pkgs.nzbget}/bin/nzbget -n -o Control_iP=127.0.0.1 -o Control_port=6789 -o Control_password=tegbzn6789 -V"
)
'';
})