From cefa20b6ac66bfe7793f6ded33a7eb9e2354379f Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Mon, 27 Jul 2020 14:59:35 -0700 Subject: [PATCH 1/1] Two machines --- tests/automatic-enrollment.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 ))' ) ''; }) -- 2.44.1