mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
nixos/rtorrent: add NixOS tests
This commit is contained in:
parent
33f1e2ece3
commit
b8cd02c34f
@ -824,6 +824,7 @@ in {
|
||||
rstudio-server = handleTest ./rstudio-server.nix {};
|
||||
rsyncd = handleTest ./rsyncd.nix {};
|
||||
rsyslogd = handleTest ./rsyslogd.nix {};
|
||||
rtorrent = handleTest ./rtorrent.nix {};
|
||||
rxe = handleTest ./rxe.nix {};
|
||||
sabnzbd = handleTest ./sabnzbd.nix {};
|
||||
samba = handleTest ./samba.nix {};
|
||||
|
25
nixos/tests/rtorrent.nix
Normal file
25
nixos/tests/rtorrent.nix
Normal file
@ -0,0 +1,25 @@
|
||||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
let
|
||||
port = 50001;
|
||||
in
|
||||
{
|
||||
name = "rtorrent";
|
||||
meta = {
|
||||
maintainers = with pkgs.lib.maintainers; [ thiagokokada ];
|
||||
};
|
||||
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
services.rtorrent = {
|
||||
inherit port;
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = /* python */ ''
|
||||
machine.start()
|
||||
machine.wait_for_unit("rtorrent.service")
|
||||
machine.wait_for_open_port(${toString port})
|
||||
|
||||
machine.succeed("nc -z localhost ${toString port}")
|
||||
'';
|
||||
})
|
@ -13,9 +13,10 @@
|
||||
, pkg-config
|
||||
, xmlrpc_c
|
||||
, zlib
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation {
|
||||
pname = "rakshasa-rtorrent";
|
||||
version = "0.9.8+date=2022-06-20";
|
||||
|
||||
@ -53,6 +54,10 @@ stdenv.mkDerivation rec {
|
||||
"--with-posix-fallocate"
|
||||
];
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) rtorrent;
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
|
Loading…
Reference in New Issue
Block a user