[Backport release-25.11] nixosTests.syncthing-many-devices: fix (#472467)

This commit is contained in:
Aleksana
2025-12-20 03:24:03 +00:00
committed by GitHub
2 changed files with 18 additions and 6 deletions

View File

@@ -1457,9 +1457,7 @@ in
syncthing-guiPassword = runTest ./syncthing/guiPassword.nix;
syncthing-guiPasswordFile = runTest ./syncthing/guiPasswordFile.nix;
syncthing-init = runTest ./syncthing/init.nix;
# FIXME: Test has been failing since 2025-07-06:
# https://github.com/NixOS/nixpkgs/issues/447674
# syncthing-many-devices = runTest ./syncthing/many-devices.nix;
syncthing-many-devices = runTest ./syncthing/many-devices.nix;
syncthing-no-settings = runTest ./syncthing/no-settings.nix;
syncthing-relay = runTest ./syncthing/relay.nix;
sysfs = runTest ./sysfs.nix;

View File

@@ -138,12 +138,26 @@ let
(printf "X-API-Key: "; cat "$RUNTIME_DIRECTORY/api_key") >"$RUNTIME_DIRECTORY/headers"
${pkgs.curl}/bin/curl -sSLk -H "@$RUNTIME_DIRECTORY/headers" \
--retry 1000 --retry-delay 1 --retry-all-errors \
--retry 5 --retry-delay 1 --retry-all-errors \
"$@"
}
curl -d ${lib.escapeShellArg (builtins.toJSON { deviceID = IDsToDelete.device; })} \
curl -d ${
lib.escapeShellArg (
builtins.toJSON {
deviceID = IDsToDelete.device;
name = "DeleteMe";
}
)
} \
-X POST 127.0.0.1:8384/rest/config/devices
curl -d ${lib.escapeShellArg (builtins.toJSON { id = IDsToDelete.folder; })} \
curl -d ${
lib.escapeShellArg (
builtins.toJSON {
id = IDsToDelete.folder;
path = "/var/lib/syncthing/DeleteMe";
}
)
} \
-X POST 127.0.0.1:8384/rest/config/folders
'';
in