Add eval tests to the zerotier clanService module. The vm module is a stub that acts as an api for the `generate-test-vars` script, as that currently only works with a vm, not with an eval test. This checks, if all the peers pick up their respective configuration correctly. Without running the service itself.
44 lines
736 B
Nix
44 lines
736 B
Nix
{
|
|
pkgs,
|
|
nixosLib,
|
|
clan-core,
|
|
module,
|
|
...
|
|
}:
|
|
nixosLib.runTest (
|
|
{ ... }:
|
|
{
|
|
imports = [
|
|
clan-core.modules.nixosVmTest.clanTest
|
|
];
|
|
|
|
hostPkgs = pkgs;
|
|
|
|
name = "zerotier";
|
|
|
|
clan = {
|
|
directory = ./.;
|
|
modules."zerotier" = module;
|
|
inventory = {
|
|
|
|
machines.jon = { };
|
|
machines.sara = { };
|
|
machines.bam = { };
|
|
|
|
instances = {
|
|
"zerotier" = {
|
|
module.name = "zerotier";
|
|
|
|
roles.peer.tags.all = { };
|
|
roles.controller.machines.bam = { };
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
# This is not an actual vm test, this is a workaround to
|
|
# generate the needed vars for the eval test.
|
|
testScript = '''';
|
|
}
|
|
)
|