nixos/deluge: port test to python
This commit is contained in:
parent
e31441ba9e
commit
103f128dbb
1 changed files with 14 additions and 12 deletions
|
@ -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'"
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue