kubenix/tests/default.nix

57 lines
1.3 KiB
Nix
Raw Normal View History

2019-02-12 16:22:18 +01:00
{ pkgs ? import <nixpkgs> {}
2019-03-07 18:02:26 +01:00
, lib ? pkgs.lib
, kubenix ? import ../. { inherit pkgs lib; }
2021-04-28 21:15:58 -05:00
, k8sVersion ? "1.21"
2019-05-05 11:55:19 +02:00
, nixosPath ? toString <nixpkgs/nixos>
2019-02-12 16:22:18 +01:00
# whether any testing error should throw an error
, throwError ? true
, e2e ? true }:
2019-02-12 16:22:18 +01:00
with lib;
let
2019-02-25 17:16:24 +01:00
images = pkgs.callPackage ./images.nix {};
2019-03-08 00:39:09 +01:00
test = (kubenix.evalModules {
modules = [
kubenix.modules.testing
2019-02-12 16:22:18 +01:00
{
2019-05-05 11:55:19 +02:00
testing.name = "k8s-${k8sVersion}";
testing.throwError = throwError;
testing.e2e = e2e;
testing.tests = [
./k8s/simple.nix
./k8s/deployment.nix
2020-01-30 20:53:26 -06:00
./k8s/deployment-k3s.nix
2021-05-05 22:31:07 -04:00
# ./k8s/crd.nix # flaky
./k8s/defaults.nix
2019-02-28 14:04:47 +01:00
./k8s/order.nix
./k8s/submodule.nix
./k8s/imports.nix
2021-05-05 22:31:07 -04:00
# ./legacy/k8s.nix
# ./legacy/crd.nix
# ./legacy/modules.nix
2020-04-04 19:17:59 +07:00
./helm/simple.nix
2021-05-05 22:31:07 -04:00
# ./istio/bookinfo.nix # infinite recusion
./submodules/simple.nix
2019-02-26 21:23:14 +01:00
./submodules/defaults.nix
./submodules/versioning.nix
./submodules/exports.nix
./submodules/passthru.nix
];
testing.args = {
inherit images k8sVersion;
};
}
];
args = {
inherit pkgs;
};
specialArgs = {
2019-05-03 23:25:49 +02:00
inherit kubenix nixosPath;
};
2019-03-08 00:39:09 +01:00
}).config;
2019-05-05 11:55:19 +02:00
in pkgs.recurseIntoAttrs test.testing