Loading nixos/tests/patroni.nix +1 −1 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: print(node.succeed("patronictl list cluster1")) node.wait_until_succeeds(f"[ $(patronictl list -f json cluster1 | jq 'length') == {expected_replicas + 1} ]") node.wait_until_succeeds("[ $(patronictl list -f json cluster1 | jq 'map(select(.Role | test(\"^Leader$\"))) | map(select(.State | test(\"^running$\"))) | length') == 1 ]") node.wait_until_succeeds(f"[ $(patronictl list -f json cluster1 | jq 'map(select(.Role | test(\"^Replica$\"))) | map(select(.State | test(\"^running$\"))) | length') == {expected_replicas} ]") node.wait_until_succeeds(f"[ $(patronictl list -f json cluster1 | jq 'map(select(.Role | test(\"^Replica$\"))) | map(select(.State | test(\"^streaming$\"))) | length') == {expected_replicas} ]") print(node.succeed("patronictl list cluster1")) client.wait_until_succeeds("psql -h 127.0.0.1 -U postgres --command='select 1;'") Loading pkgs/servers/sql/patroni/default.nix +3 −10 Original line number Diff line number Diff line Loading @@ -6,24 +6,17 @@ pythonPackages.buildPythonApplication rec { pname = "patroni"; version = "2.1.3"; version = "3.3.0"; src = fetchFromGitHub { owner = "zalando"; repo = pname; rev = "v${version}"; sha256 = "sha256-cBkiBrty/6A3rIv9A1oh8GvPjwxhHwYEKuDIsNzHw1g="; sha256 = "sha256-gOjjE++hf3GOimvCxBR0jqqi3JNpbejLcWbLHpz2H4Q="; }; # cdiff renamed to ydiff; remove when patroni source reflects this. postPatch = '' for i in requirements.txt patroni/ctl.py tests/test_ctl.py; do substituteInPlace $i --replace cdiff ydiff done ''; propagatedBuildInputs = with pythonPackages; [ boto boto3 click consul dnspython Loading Loading
nixos/tests/patroni.nix +1 −1 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: print(node.succeed("patronictl list cluster1")) node.wait_until_succeeds(f"[ $(patronictl list -f json cluster1 | jq 'length') == {expected_replicas + 1} ]") node.wait_until_succeeds("[ $(patronictl list -f json cluster1 | jq 'map(select(.Role | test(\"^Leader$\"))) | map(select(.State | test(\"^running$\"))) | length') == 1 ]") node.wait_until_succeeds(f"[ $(patronictl list -f json cluster1 | jq 'map(select(.Role | test(\"^Replica$\"))) | map(select(.State | test(\"^running$\"))) | length') == {expected_replicas} ]") node.wait_until_succeeds(f"[ $(patronictl list -f json cluster1 | jq 'map(select(.Role | test(\"^Replica$\"))) | map(select(.State | test(\"^streaming$\"))) | length') == {expected_replicas} ]") print(node.succeed("patronictl list cluster1")) client.wait_until_succeeds("psql -h 127.0.0.1 -U postgres --command='select 1;'") Loading
pkgs/servers/sql/patroni/default.nix +3 −10 Original line number Diff line number Diff line Loading @@ -6,24 +6,17 @@ pythonPackages.buildPythonApplication rec { pname = "patroni"; version = "2.1.3"; version = "3.3.0"; src = fetchFromGitHub { owner = "zalando"; repo = pname; rev = "v${version}"; sha256 = "sha256-cBkiBrty/6A3rIv9A1oh8GvPjwxhHwYEKuDIsNzHw1g="; sha256 = "sha256-gOjjE++hf3GOimvCxBR0jqqi3JNpbejLcWbLHpz2H4Q="; }; # cdiff renamed to ydiff; remove when patroni source reflects this. postPatch = '' for i in requirements.txt patroni/ctl.py tests/test_ctl.py; do substituteInPlace $i --replace cdiff ydiff done ''; propagatedBuildInputs = with pythonPackages; [ boto boto3 click consul dnspython Loading