deluge: add test

This commit is contained in:
Florian Klink 2018-01-10 01:52:15 +01:00
parent 8fccc7e1df
commit fe840cd333
2 changed files with 30 additions and 0 deletions

View File

@ -264,6 +264,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-edge = callTestOnMatchingSystems ["x86_64-linux"] tests/docker-edge.nix {};

29
nixos/tests/deluge.nix Normal file
View 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");
'';
})