nixpkgs/nixos/tests/rtorrent.nix

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

31 lines
579 B
Nix
Raw Normal View History

2024-06-23 23:38:41 +00:00
import ./make-test-python.nix (
{ pkgs, ... }:
let
port = 50001;
in
{
name = "rtorrent";
meta = {
maintainers = with pkgs.lib.maintainers; [ thiagokokada ];
};
nodes.machine =
{ pkgs, ... }:
{
2024-06-23 23:38:41 +00:00
services.rtorrent = {
inherit port;
enable = true;
};
};
2024-06-23 23:38:41 +00:00
testScript = # python
''
machine.start()
machine.wait_for_unit("rtorrent.service")
machine.wait_for_open_port(${toString port})
machine.succeed("nc -z localhost ${toString port}")
'';
}
)