mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 18:26:45 +01:00
25bef2d8f9
The library does not depend on stdenv, that `stdenv` exposes `lib` is an artifact of the ancient origins of nixpkgs.
32 lines
742 B
Nix
32 lines
742 B
Nix
import ./make-test-python.nix ({ lib, pkgs, ... }: let
|
|
|
|
testId = "7CFNTQM-IMTJBHJ-3UWRDIU-ZGQJFR6-VCXZ3NB-XUH3KZO-N52ITXR-LAIYUAU";
|
|
|
|
in {
|
|
name = "syncthing-init";
|
|
meta.maintainers = with pkgs.lib.maintainers; [ lassulus ];
|
|
|
|
machine = {
|
|
services.syncthing = {
|
|
enable = true;
|
|
declarative = {
|
|
devices.testDevice = {
|
|
id = testId;
|
|
};
|
|
folders.testFolder = {
|
|
path = "/tmp/test";
|
|
devices = [ "testDevice" ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
machine.wait_for_unit("syncthing-init.service")
|
|
config = machine.succeed("cat /var/lib/syncthing/.config/syncthing/config.xml")
|
|
|
|
assert "testFolder" in config
|
|
assert "${testId}" in config
|
|
'';
|
|
})
|