From fe840cd3339eba56855840630d22889ee1424bfb Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 10 Jan 2018 01:52:15 +0100 Subject: [PATCH] deluge: add test --- nixos/release.nix | 1 + nixos/tests/deluge.nix | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 nixos/tests/deluge.nix diff --git a/nixos/release.nix b/nixos/release.nix index 4fd77e6471cf..39a6f34aa985 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -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 {}; diff --git a/nixos/tests/deluge.nix b/nixos/tests/deluge.nix new file mode 100644 index 000000000000..6119fd58447c --- /dev/null +++ b/nixos/tests/deluge.nix @@ -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"); + ''; +})