X-Git-Url: http://git.scottworley.com/syncthing-autoregister/blobdiff_plain/36008f17427b61f0b86143a260f748a534688ae8..4ac4946095213d617adde6b5e7067298c61e6df9:/tests/automatic-enrollment.nix?ds=inline diff --git a/tests/automatic-enrollment.nix b/tests/automatic-enrollment.nix index 6520c9f..617f672 100644 --- a/tests/automatic-enrollment.nix +++ b/tests/automatic-enrollment.nix @@ -57,7 +57,7 @@ import ({ pkgs, lib, ... }: def verifyDeviceIDSet(machine, expectedDevice): - machine.succeed( + machine.wait_until_succeeds( '(( "$(nix eval --raw -f "" config.services.syncthing.declarative.devices.%s.id | wc -c)" == 63 ))' % expectedDevice ) @@ -82,13 +82,16 @@ import ({ pkgs, lib, ... }: "${configurationWithDeviceIDs}" ) + start_all() a.wait_for_unit("syncthing-autoregister.service") setConfig(a, configurationWithDeviceIDs) verifyDeviceIDSet(a, "a") getDeviceFile(a) + b.wait_for_unit("syncthing-autoregister.service") putDeviceFile(b) setConfig(b, configurationWithDeviceIDs) verifyDeviceIDSet(b, "a") + verifyDeviceIDSet(b, "b") ''; })