diff options
author | Jan Hrnko <jan.hrnko@satoshilabs.com> | 2019-11-09 19:09:51 +0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2019-11-22 20:38:56 +0100 |
commit | 103f128dbb4552fbf5f05f749793041dcb0b2534 (patch) | |
tree | ed978bd43f26e0369df4d3c9bb8ab78ba7876027 /nixos/tests/deluge.nix | |
parent | e31441ba9ef845c192fc61917eee2d6078f2d27d (diff) |
nixos/deluge: port test to python
Diffstat (limited to 'nixos/tests/deluge.nix')
-rw-r--r-- | nixos/tests/deluge.nix | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/nixos/tests/deluge.nix b/nixos/tests/deluge.nix index b58030409b5c..37689c3d9137 100644 --- a/nixos/tests/deluge.nix +++ b/nixos/tests/deluge.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test-python.nix ({ pkgs, ...} : { name = "deluge"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ flokli ]; @@ -45,18 +45,20 @@ import ./make-test.nix ({ pkgs, ...} : { }; testScript = '' - startAll; + start_all() - $simple->waitForUnit("deluged"); - $simple->waitForUnit("delugeweb"); - $simple->waitForOpenPort("8112"); - $declarative->waitForUnit("network.target"); - $declarative->waitUntilSucceeds("curl --fail http://simple:8112"); + simple.wait_for_unit("deluged") + simple.wait_for_unit("delugeweb") + simple.wait_for_open_port("8112") + declarative.wait_for_unit("network.target") + declarative.wait_until_succeeds("curl --fail http://simple:8112") - $declarative->waitForUnit("deluged"); - $declarative->waitForUnit("delugeweb"); - $declarative->waitUntilSucceeds("curl --fail http://declarative:3142"); - $declarative->succeed("deluge-console 'help' | grep -q 'rm - Remove a torrent'"); - $declarative->succeed("deluge-console 'connect 127.0.0.1:58846 andrew password; help' | grep -q 'rm - Remove a torrent'"); + declarative.wait_for_unit("deluged") + declarative.wait_for_unit("delugeweb") + declarative.wait_until_succeeds("curl --fail http://declarative:3142") + declarative.succeed("deluge-console 'help' | grep -q 'rm - Remove a torrent'") + declarative.succeed( + "deluge-console 'connect 127.0.0.1:58846 andrew password; help' | grep -q 'rm - Remove a torrent'" + ) ''; }) |