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;
13 environment.systemPackages = with pkgs; [ nix ];
20 machine = "${configuration}";
23 machine.copy_from_host(
25 "/etc/nixos/configuration.nix",
27 machine.wait_for_unit("syncthing-autoregister.service")
29 '(( "$(nix eval --raw -f /tmp/syncthing-auto-register-test-device-ids.nix services.syncthing.declarative.devices.machine.id | wc -c)" == 63 ))'