2023-01-06 07:59:38 +00:00
|
|
|
{ pkgs ? import ./nixpkgs.nix
|
|
|
|
, flake ? (import ../flake-compat.nix).defaultNix
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pkgs) lib;
|
|
|
|
|
|
|
|
nixosLib = import (pkgs.path + "/nixos/lib") { };
|
|
|
|
|
|
|
|
runTest = module: (nixosLib.evalTest ({ config, ... }: {
|
|
|
|
imports = [
|
|
|
|
module
|
|
|
|
{
|
|
|
|
hostPkgs = pkgs;
|
|
|
|
_module.args.flake = flake;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
result = config.test;
|
|
|
|
})).config.result;
|
|
|
|
|
|
|
|
basicTests = let
|
|
|
|
matrix = {
|
|
|
|
database = [ "sqlite" "postgres" ];
|
|
|
|
storage = [ "local" "minio" ];
|
|
|
|
};
|
|
|
|
in builtins.listToAttrs (map (e: {
|
|
|
|
name = "basic-${e.database}-${e.storage}";
|
|
|
|
value = runTest {
|
|
|
|
imports = [
|
|
|
|
./basic
|
|
|
|
{
|
|
|
|
inherit (e) database storage;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-08-19 18:49:56 +00:00
|
|
|
}) (lib.cartesianProduct matrix));
|
2023-01-06 07:59:38 +00:00
|
|
|
in {
|
|
|
|
} // basicTests
|