arion/tests/default.nix

47 lines
1.1 KiB
Nix
Raw Normal View History

2021-05-26 20:58:59 +02:00
{ pkgs ? import ../pkgs.nix, arionTestingFlags ? {} }:
let
2021-10-28 21:59:01 +02:00
inherit (pkgs) nixosTest recurseIntoAttrs arion lib;
hasEvalModulesType = (lib.evalModules { modules = [ {} ]; })?type;
in
recurseIntoAttrs {
2021-05-26 20:58:59 +02:00
test = nixosTest ./arion-test;
2021-10-28 21:59:01 +02:00
nixosModuleWithDocker =
lib.optionalAttrs
hasEvalModulesType
(
import ./nixos-virtualization-arion-test/test.nix pkgs {
virtualisation.arion.backend = "docker";
}
);
nixosModuleWithPodman =
lib.optionalAttrs
(hasEvalModulesType && arionTestingFlags.nixosHasPodmanDockerSocket)
(
import ./nixos-virtualization-arion-test/test.nix pkgs {
virtualisation.arion.backend = "podman-socket";
}
);
testWithPodman =
if arionTestingFlags.nixosHasPodmanDockerSocket
2022-04-08 00:03:31 +02:00
then nixosTest (import ./arion-test { usePodman = true; inherit pkgs lib; })
else {};
testBuild = arion.build {
# To be more accurately, you can do
# pkgs = import ../examples/minimal/arion-pkgs.nix;
# but this is quite efficient:
inherit pkgs;
modules = [ ../examples/minimal/arion-compose.nix ];
};
}