2021-05-26 20:58:59 +02:00
|
|
|
{ pkgs ? import ../pkgs.nix, arionTestingFlags ? {} }:
|
2019-01-02 09:54:46 +01:00
|
|
|
let
|
2021-10-28 21:59:01 +02:00
|
|
|
inherit (pkgs) nixosTest recurseIntoAttrs arion lib;
|
|
|
|
|
|
|
|
hasEvalModulesType = (lib.evalModules { modules = [ {} ]; })?type;
|
|
|
|
|
2019-01-02 09:54:46 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
recurseIntoAttrs {
|
2019-03-26 14:06:50 +01:00
|
|
|
|
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";
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2021-05-26 16:57:56 +02:00
|
|
|
testWithPodman =
|
|
|
|
if arionTestingFlags.nixosHasPodmanDockerSocket
|
2022-04-08 00:03:31 +02:00
|
|
|
then nixosTest (import ./arion-test { usePodman = true; inherit pkgs lib; })
|
2021-05-26 16:57:56 +02:00
|
|
|
else {};
|
2019-03-26 14:06:50 +01:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
|
2019-01-02 09:54:46 +01:00
|
|
|
}
|