]> git.scottworley.com Git - syncthing-autoregister/blobdiff - tests/automatic-enrollment.nix
Follow renames in test data
[syncthing-autoregister] / tests / automatic-enrollment.nix
index 184bcc75e99c455f335d888479f8866f01b95c1d..510b5c9ec9db3c088c9517cb720d015595130ae5 100644 (file)
@@ -26,7 +26,7 @@ import <nixpkgs/nixos/tests/make-test-python.nix> ({ pkgs, lib, ... }:
       modules = [ "${vmConfiguration}" ];
     };
 
       modules = [ "${vmConfiguration}" ];
     };
 
-    # Also include a syncthing configuration with a declarative device id
+    # Also include a syncthing configuration with a device id
     # because using this feature pulls in additional dependencies.
     evaluatedSyncthingDeclarativeConfiguration = import <nixos/nixos/lib/eval-config.nix> {
       system = builtins.currentSystem;
     # because using this feature pulls in additional dependencies.
     evaluatedSyncthingDeclarativeConfiguration = import <nixos/nixos/lib/eval-config.nix> {
       system = builtins.currentSystem;
@@ -35,7 +35,7 @@ import <nixpkgs/nixos/tests/make-test-python.nix> ({ pkgs, lib, ... }:
         {
           services.syncthing = {
             enable = true;
         {
           services.syncthing = {
             enable = true;
-            declarative.folders.forDeps.path = "/nope";
+            settings.folders.forDeps.path = "/nope";
           };
         }
       ];
           };
         }
       ];
@@ -71,7 +71,7 @@ import <nixpkgs/nixos/tests/make-test-python.nix> ({ pkgs, lib, ... }:
       pkgs.writeText "configuration-with-folder.nix" ''
         { config, ... }: {
           imports = [ ${configurationWithDeviceIDs} ];
       pkgs.writeText "configuration-with-folder.nix" ''
         { config, ... }: {
           imports = [ ${configurationWithDeviceIDs} ];
-          services.syncthing.declarative.folders.foo = {
+          services.syncthing.settings.folders.foo = {
             devices = [ "a" "b" ];
             path = "''${config.services.syncthing.dataDir}/foo";
           };
             devices = [ "a" "b" ];
             path = "''${config.services.syncthing.dataDir}/foo";
           };
@@ -97,7 +97,7 @@ import <nixpkgs/nixos/tests/make-test-python.nix> ({ pkgs, lib, ... }:
 
       def verifyDeviceIDSet(machine, expectedDevice):
           machine.wait_until_succeeds(
 
       def verifyDeviceIDSet(machine, expectedDevice):
           machine.wait_until_succeeds(
-              '(( "$(nix eval --raw -f "<nixos/nixos>" config.services.syncthing.declarative.devices.%s.id | wc -c)" == 63 ))'
+              '(( "$(nix --experimental-features nix-command eval --impure --raw --expr "(import <nixos/nixos> {}).config.services.syncthing.settings.devices.%s.id" | wc -c)" == 63 ))'
               % expectedDevice
           )
 
               % expectedDevice
           )