1import ./make-test-python.nix (
2 { pkgs, ... }:
3 let
4 port = 50001;
5 in
6 {
7 name = "rtorrent";
8 meta = {
9 maintainers = with pkgs.lib.maintainers; [ thiagokokada ];
10 };
11
12 nodes.machine =
13 { pkgs, ... }:
14 {
15 services.rtorrent = {
16 inherit port;
17 enable = true;
18 };
19 };
20
21 testScript = # python
22 ''
23 machine.start()
24 machine.wait_for_unit("rtorrent.service")
25 machine.wait_for_open_port(${toString port})
26
27 machine.succeed("nc -z localhost ${toString port}")
28 '';
29 }
30)