]> git.scottworley.com Git - syncthing-autoregister/commitdiff
Name hostDeviceIDFilename
authorScott Worley <scottworley@scottworley.com>
Mon, 27 Jul 2020 23:15:46 +0000 (16:15 -0700)
committerScott Worley <scottworley@scottworley.com>
Mon, 27 Jul 2020 23:15:46 +0000 (16:15 -0700)
tests/automatic-enrollment.nix

index 4ff3670a3df0c35a53522b48f2c3ffe1730cfaa3..5ab4efac5028910e3c9cbc882c9a83f9e290d87e 100644 (file)
@@ -67,17 +67,18 @@ import <nixpkgs/nixos/tests/make-test-python.nix> ({ pkgs, lib, ... }:
           "${configurationWithDeviceIDs}"
       )
 
           "${configurationWithDeviceIDs}"
       )
 
+      hostDeviceIDFilename = os.path.join(
+          os.environ["out"],
+          os.path.basename("${deviceIDFilename}"),
+      )
+
       a.wait_for_unit("syncthing-autoregister.service")
       setConfig(a, configurationWithDeviceIDs)
       verifyDeviceIDSet(a, "a")
       a.copy_from_vm("${deviceIDFilename}")
 
       b.copy_from_host(
       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}",
+          hostDeviceIDFilename, "${deviceIDFilename}"
       )
       b.succeed("chown syncthing ${deviceIDFilename}")
       setConfig(b, configurationWithDeviceIDs)
       )
       b.succeed("chown syncthing ${deviceIDFilename}")
       setConfig(b, configurationWithDeviceIDs)