nixos/deluge: port test to python
This commit is contained in:
parent
e31441ba9e
commit
103f128dbb
|
@ -1,4 +1,4 @@
|
||||||
import ./make-test.nix ({ pkgs, ...} : {
|
import ./make-test-python.nix ({ pkgs, ...} : {
|
||||||
name = "deluge";
|
name = "deluge";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.stdenv.lib.maintainers; {
|
||||||
maintainers = [ flokli ];
|
maintainers = [ flokli ];
|
||||||
|
@ -45,18 +45,20 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
startAll;
|
start_all()
|
||||||
|
|
||||||
$simple->waitForUnit("deluged");
|
simple.wait_for_unit("deluged")
|
||||||
$simple->waitForUnit("delugeweb");
|
simple.wait_for_unit("delugeweb")
|
||||||
$simple->waitForOpenPort("8112");
|
simple.wait_for_open_port("8112")
|
||||||
$declarative->waitForUnit("network.target");
|
declarative.wait_for_unit("network.target")
|
||||||
$declarative->waitUntilSucceeds("curl --fail http://simple:8112");
|
declarative.wait_until_succeeds("curl --fail http://simple:8112")
|
||||||
|
|
||||||
$declarative->waitForUnit("deluged");
|
declarative.wait_for_unit("deluged")
|
||||||
$declarative->waitForUnit("delugeweb");
|
declarative.wait_for_unit("delugeweb")
|
||||||
$declarative->waitUntilSucceeds("curl --fail http://declarative:3142");
|
declarative.wait_until_succeeds("curl --fail http://declarative:3142")
|
||||||
$declarative->succeed("deluge-console 'help' | grep -q 'rm - Remove a torrent'");
|
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.succeed(
|
||||||
|
"deluge-console 'connect 127.0.0.1:58846 andrew password; help' | grep -q 'rm - Remove a torrent'"
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue