mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 14:45:27 +00:00
Merge pull request #33679 from flokli/deluge-module
Deluge: use mkEnableOption, add test
This commit is contained in:
commit
e4d2d32a32
|
@ -11,10 +11,7 @@ in {
|
|||
options = {
|
||||
services = {
|
||||
deluge = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Start the Deluge daemon";
|
||||
};
|
||||
enable = mkEnableOption "Deluge daemon";
|
||||
|
||||
openFilesLimit = mkOption {
|
||||
default = openFilesLimit;
|
||||
|
@ -25,14 +22,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
deluge.web = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
Start Deluge Web daemon.
|
||||
'';
|
||||
};
|
||||
};
|
||||
deluge.web.enable = mkEnableOption "Deluge Web daemon";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -268,6 +268,7 @@ in rec {
|
|||
tests.containers-hosts = callTest tests/containers-hosts.nix {};
|
||||
tests.containers-macvlans = callTest tests/containers-macvlans.nix {};
|
||||
tests.couchdb = callTest tests/couchdb.nix {};
|
||||
tests.deluge = callTest tests/deluge.nix {};
|
||||
tests.docker = callTestOnMatchingSystems ["x86_64-linux"] tests/docker.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 {};
|
||||
|
|
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…
Reference in a new issue