1 import <nixpkgs/nixos/tests/make-test-python.nix> ({ pkgs, lib, ... }:
3 configuration = pkgs.writeText "configuration.nix" ''
6 ${../.}/modules/syncthing-autoregister.nix
7 <nixos/nixos/modules/installer/cd-dvd/channel.nix>
11 openDefaultPorts = true;
14 path = "/tmp/syncthing-auto-register-test-device-ids.nix";
17 environment.systemPackages = with pkgs; [ nix ];
24 machine = "${configuration}";
27 machine.copy_from_host(
29 "/etc/nixos/configuration.nix",
31 machine.wait_for_unit("syncthing-autoregister.service")
33 '(( "$(nix eval --raw -f /tmp/syncthing-auto-register-test-device-ids.nix services.syncthing.declarative.devices.machine.id | wc -c)" == 63 ))'