mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +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
|
@ -11,10 +11,7 @@ in {
|
||||||
options = {
|
options = {
|
||||||
services = {
|
services = {
|
||||||
deluge = {
|
deluge = {
|
||||||
enable = mkOption {
|
enable = mkEnableOption "Deluge daemon";
|
||||||
default = false;
|
|
||||||
description = "Start the Deluge daemon";
|
|
||||||
};
|
|
||||||
|
|
||||||
openFilesLimit = mkOption {
|
openFilesLimit = mkOption {
|
||||||
default = openFilesLimit;
|
default = openFilesLimit;
|
||||||
|
@ -25,14 +22,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
deluge.web = {
|
deluge.web.enable = mkEnableOption "Deluge Web daemon";
|
||||||
enable = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Start Deluge Web daemon.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -268,6 +268,7 @@ in rec {
|
||||||
tests.containers-hosts = callTest tests/containers-hosts.nix {};
|
tests.containers-hosts = callTest tests/containers-hosts.nix {};
|
||||||
tests.containers-macvlans = callTest tests/containers-macvlans.nix {};
|
tests.containers-macvlans = callTest tests/containers-macvlans.nix {};
|
||||||
tests.couchdb = callTest tests/couchdb.nix {};
|
tests.couchdb = callTest tests/couchdb.nix {};
|
||||||
|
tests.deluge = callTest tests/deluge.nix {};
|
||||||
tests.docker = callTestOnMatchingSystems ["x86_64-linux"] tests/docker.nix {};
|
tests.docker = callTestOnMatchingSystems ["x86_64-linux"] tests/docker.nix {};
|
||||||
tests.docker-tools = callTestOnMatchingSystems ["x86_64-linux"] tests/docker-tools.nix {};
|
tests.docker-tools = callTestOnMatchingSystems ["x86_64-linux"] tests/docker-tools.nix {};
|
||||||
tests.docker-tools-overlay = callTestOnMatchingSystems ["x86_64-linux"] tests/docker-tools-overlay.nix {};
|
tests.docker-tools-overlay = callTestOnMatchingSystems ["x86_64-linux"] tests/docker-tools-overlay.nix {};
|
||||||
|
|
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