mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge pull request #33679 from flokli/deluge-module
Deluge: use mkEnableOption, add test
This commit is contained in:
commit
e4d2d32a32
3 changed files with 32 additions and 12 deletions
29
nixos/tests/deluge.nix
Normal file
29
nixos/tests/deluge.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "deluge";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ flokli ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
server =
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{ services.deluge = {
|
||||
enable = true;
|
||||
web.enable = true;
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 8112 ];
|
||||
};
|
||||
|
||||
client = { };
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
startAll;
|
||||
|
||||
$server->waitForUnit("deluged");
|
||||
$server->waitForUnit("delugeweb");
|
||||
$client->waitForUnit("network.target");
|
||||
$client->waitUntilSucceeds("curl --fail http://server:8112");
|
||||
'';
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue