From: Scott Worley Date: Mon, 27 Jul 2020 21:59:35 +0000 (-0700) Subject: Two machines X-Git-Url: http://git.scottworley.com/syncthing-autoregister/commitdiff_plain/cefa20b6ac66bfe7793f6ded33a7eb9e2354379f?hp=97c3aa62b041338b32fc3755c8ff3483ea1acb9c Two machines --- diff --git a/tests/automatic-enrollment.nix b/tests/automatic-enrollment.nix index 49325fa..4694048 100644 --- a/tests/automatic-enrollment.nix +++ b/tests/automatic-enrollment.nix @@ -30,7 +30,10 @@ import ({ pkgs, lib, ... }: name = "syncthing"; - machine = "${configuration}"; + nodes = { + a = "${configuration}"; + b = "${configuration}"; + }; testScript = '' def setConfig(machine, config): @@ -42,11 +45,11 @@ import ({ pkgs, lib, ... }: "${configurationWithDeviceIDs}" ) - setConfig(machine, initialConfiguration) - machine.wait_for_unit("syncthing-autoregister.service") - setConfig(machine, configurationWithDeviceIDs) - machine.succeed( - '(( "$(nix eval --raw -f "" config.services.syncthing.declarative.devices.machine.id | wc -c)" == 63 ))' + setConfig(a, initialConfiguration) + a.wait_for_unit("syncthing-autoregister.service") + setConfig(a, configurationWithDeviceIDs) + a.succeed( + '(( "$(nix eval --raw -f "" config.services.syncthing.declarative.devices.a.id | wc -c)" == 63 ))' ) ''; })