diff options
author | Florian Klink <flokli@flokli.de> | 2019-04-27 18:26:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-27 18:26:50 +0200 |
commit | 033882e0b75c8394635cb8cc460f97ba0a0316db (patch) | |
tree | d78f93fc6ca97813b78d726f1fbff49007187978 /nixos/tests | |
parent | 1839b54df02bafbf38594d8194c905e95c51f36e (diff) | |
parent | 5b76046db38124ef8cf06dad4dce9e0765ad8ff5 (diff) | |
download | nixlib-033882e0b75c8394635cb8cc460f97ba0a0316db.tar nixlib-033882e0b75c8394635cb8cc460f97ba0a0316db.tar.gz nixlib-033882e0b75c8394635cb8cc460f97ba0a0316db.tar.bz2 nixlib-033882e0b75c8394635cb8cc460f97ba0a0316db.tar.lz nixlib-033882e0b75c8394635cb8cc460f97ba0a0316db.tar.xz nixlib-033882e0b75c8394635cb8cc460f97ba0a0316db.tar.zst nixlib-033882e0b75c8394635cb8cc460f97ba0a0316db.zip |
Merge pull request #60019 from aanderse/nzbget
nzbget: fix broken service, as well as some improvements
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/nzbget.nix | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 016e695b3ada..81dc7beb6021 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -172,6 +172,7 @@ in nix-ssh-serve = handleTest ./nix-ssh-serve.nix {}; novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {}; nsd = handleTest ./nsd.nix {}; + nzbget = handleTest ./nzbget.nix {}; openldap = handleTest ./openldap.nix {}; opensmtpd = handleTest ./opensmtpd.nix {}; openssh = handleTest ./openssh.nix {}; diff --git a/nixos/tests/nzbget.nix b/nixos/tests/nzbget.nix new file mode 100644 index 000000000000..042ccec98cf6 --- /dev/null +++ b/nixos/tests/nzbget.nix @@ -0,0 +1,26 @@ +import ./make-test.nix ({ pkgs, ...} : { + name = "nzbget"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ aanderse flokli ]; + }; + + nodes = { + server = { ... }: { + services.nzbget.enable = true; + + # hack, don't add (unfree) unrar to nzbget's path, + # so we can run this test in CI + systemd.services.nzbget.path = pkgs.stdenv.lib.mkForce [ pkgs.p7zip ]; + }; + }; + + testScript = '' + startAll; + + $server->waitForUnit("nzbget.service"); + $server->waitForUnit("network.target"); + $server->waitForOpenPort(6789); + $server->succeed("curl -s -u nzbget:tegbzn6789 http://127.0.0.1:6789 | grep -q 'This file is part of nzbget'"); + $server->succeed("${pkgs.nzbget}/bin/nzbget -n -o ControlIP=127.0.0.1 -o ControlPort=6789 -o ControlPassword=tegbzn6789 -V"); + ''; +}) |