lol

Merge pull request #33679 from flokli/deluge-module

Deluge: use mkEnableOption, add test

authored by

Matthew Justin Bauer and committed by
GitHub
e4d2d32a 160d9ed6

+32 -12
+2 -12
nixos/modules/services/torrent/deluge.nix
··· 11 11 options = { 12 12 services = { 13 13 deluge = { 14 - enable = mkOption { 15 - default = false; 16 - description = "Start the Deluge daemon"; 17 - }; 14 + enable = mkEnableOption "Deluge daemon"; 18 15 19 16 openFilesLimit = mkOption { 20 17 default = openFilesLimit; ··· 25 22 }; 26 23 }; 27 24 28 - deluge.web = { 29 - enable = mkOption { 30 - default = false; 31 - description = '' 32 - Start Deluge Web daemon. 33 - ''; 34 - }; 35 - }; 25 + deluge.web.enable = mkEnableOption "Deluge Web daemon"; 36 26 }; 37 27 }; 38 28
+1
nixos/release.nix
··· 268 268 tests.containers-hosts = callTest tests/containers-hosts.nix {}; 269 269 tests.containers-macvlans = callTest tests/containers-macvlans.nix {}; 270 270 tests.couchdb = callTest tests/couchdb.nix {}; 271 + tests.deluge = callTest tests/deluge.nix {}; 271 272 tests.docker = callTestOnMatchingSystems ["x86_64-linux"] tests/docker.nix {}; 272 273 tests.docker-tools = callTestOnMatchingSystems ["x86_64-linux"] tests/docker-tools.nix {}; 273 274 tests.docker-tools-overlay = callTestOnMatchingSystems ["x86_64-linux"] tests/docker-tools-overlay.nix {};
+29
nixos/tests/deluge.nix
··· 1 + import ./make-test.nix ({ pkgs, ...} : { 2 + name = "deluge"; 3 + meta = with pkgs.stdenv.lib.maintainers; { 4 + maintainers = [ flokli ]; 5 + }; 6 + 7 + nodes = { 8 + server = 9 + { pkgs, config, ... }: 10 + 11 + { services.deluge = { 12 + enable = true; 13 + web.enable = true; 14 + }; 15 + networking.firewall.allowedTCPPorts = [ 8112 ]; 16 + }; 17 + 18 + client = { }; 19 + }; 20 + 21 + testScript = '' 22 + startAll; 23 + 24 + $server->waitForUnit("deluged"); 25 + $server->waitForUnit("delugeweb"); 26 + $client->waitForUnit("network.target"); 27 + $client->waitUntilSucceeds("curl --fail http://server:8112"); 28 + ''; 29 + })