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.
39 lines
732 B
Nix
39 lines
732 B
Nix
{
|
|
lib,
|
|
self,
|
|
inputs,
|
|
...
|
|
}:
|
|
let
|
|
module = lib.modules.importApply ./default.nix { };
|
|
in
|
|
{
|
|
clan.modules = {
|
|
zerotier = module;
|
|
};
|
|
perSystem =
|
|
{ ... }:
|
|
let
|
|
unit-test-module = (
|
|
self.clanLib.test.flakeModules.makeEvalChecks {
|
|
inherit module;
|
|
inherit self inputs;
|
|
testName = "zerotier";
|
|
tests = ./tests/eval-tests.nix;
|
|
testArgs = { };
|
|
}
|
|
);
|
|
in
|
|
{
|
|
imports = [
|
|
unit-test-module
|
|
];
|
|
# zerotier = import ./tests/vm/default.nix {
|
|
# inherit module;
|
|
# inherit inputs pkgs;
|
|
# clan-core = self;
|
|
# nixosLib = import (self.inputs.nixpkgs + "/nixos/lib") { };
|
|
# };
|
|
};
|
|
}
|