mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
deluge: fix test (#144718)
In 780135ad5ce54a6b3e7dfb35e3b596757e2ea6f8 the nodes for testing Deluge 1.x were removed, but the test script still referred to it. This removes the references in the test script and also renames the nodes to drop the 2 suffix.
This commit is contained in:
@@ -5,7 +5,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
};
|
||||
|
||||
nodes = {
|
||||
simple2 = {
|
||||
simple = {
|
||||
services.deluge = {
|
||||
enable = true;
|
||||
package = pkgs.deluge-2_x;
|
||||
@@ -16,7 +16,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
};
|
||||
};
|
||||
|
||||
declarative2 = {
|
||||
declarative = {
|
||||
services.deluge = {
|
||||
enable = true;
|
||||
package = pkgs.deluge-2_x;
|
||||
@@ -45,27 +45,16 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
simple1.wait_for_unit("deluged")
|
||||
simple2.wait_for_unit("deluged")
|
||||
simple1.wait_for_unit("delugeweb")
|
||||
simple2.wait_for_unit("delugeweb")
|
||||
simple1.wait_for_open_port("8112")
|
||||
simple2.wait_for_open_port("8112")
|
||||
declarative1.wait_for_unit("network.target")
|
||||
declarative2.wait_for_unit("network.target")
|
||||
declarative1.wait_until_succeeds("curl --fail http://simple1:8112")
|
||||
declarative2.wait_until_succeeds("curl --fail http://simple2: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")
|
||||
|
||||
declarative1.wait_for_unit("deluged")
|
||||
declarative2.wait_for_unit("deluged")
|
||||
declarative1.wait_for_unit("delugeweb")
|
||||
declarative2.wait_for_unit("delugeweb")
|
||||
declarative1.wait_until_succeeds("curl --fail http://declarative1:3142")
|
||||
declarative2.wait_until_succeeds("curl --fail http://declarative2:3142")
|
||||
declarative1.succeed(
|
||||
"deluge-console 'connect 127.0.0.1:58846 andrew password; help' | grep -q 'rm.*Remove a torrent'"
|
||||
)
|
||||
declarative2.succeed(
|
||||
declarative.wait_for_unit("deluged")
|
||||
declarative.wait_for_unit("delugeweb")
|
||||
declarative.wait_until_succeeds("curl --fail http://declarative:3142")
|
||||
declarative.succeed(
|
||||
"deluge-console 'connect 127.0.0.1:58846 andrew password; help' | grep -q 'rm.*Remove a torrent'"
|
||||
)
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user