1
0
Fork 0
mirror of https://github.com/zhaofengli/attic.git synced 2024-12-14 11:57:30 +00:00
attic/integration-tests/default.nix
2024-08-19 14:49:56 -04:00

38 lines
778 B
Nix

{ 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;
}
];
};
}) (lib.cartesianProduct matrix));
in {
} // basicTests