From: Scott Worley Date: Mon, 27 Jul 2020 23:11:55 +0000 (-0700) Subject: Copy a's file over to b X-Git-Url: http://git.scottworley.com/syncthing-autoregister/commitdiff_plain/fc02e299c578d5c3fc581426b5f84aae244cbb87 Copy a's file over to b --- diff --git a/tests/automatic-enrollment.nix b/tests/automatic-enrollment.nix index 803013d..4ff3670 100644 --- a/tests/automatic-enrollment.nix +++ b/tests/automatic-enrollment.nix @@ -49,6 +49,9 @@ import ({ pkgs, lib, ... }: }; testScript = '' + import os + + def setConfig(machine, config): machine.copy_from_host(config, "/etc/nixos/configuration.nix") @@ -67,5 +70,17 @@ import ({ pkgs, lib, ... }: a.wait_for_unit("syncthing-autoregister.service") setConfig(a, configurationWithDeviceIDs) verifyDeviceIDSet(a, "a") + a.copy_from_vm("${deviceIDFilename}") + + b.copy_from_host( + os.path.join( + os.environ["out"], + os.path.basename("${deviceIDFilename}"), + ), + "${deviceIDFilename}", + ) + b.succeed("chown syncthing ${deviceIDFilename}") + setConfig(b, configurationWithDeviceIDs) + verifyDeviceIDSet(b, "a") ''; })