From fc02e299c578d5c3fc581426b5f84aae244cbb87 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Mon, 27 Jul 2020 16:11:55 -0700 Subject: [PATCH] Copy a's file over to b --- tests/automatic-enrollment.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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") ''; }) -- 2.44.1