kubenix/tests/default.nix

56 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; }
2019-03-08 00:39:09 +01:00
, k8sVersion ? "1.13"
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
./k8s/crd.nix
./k8s/1.13/crd.nix
./k8s/defaults.nix
2019-02-28 14:04:47 +01:00
./k8s/order.nix
./k8s/submodule.nix
./k8s/imports.nix
./legacy/k8s.nix
./legacy/modules.nix
./helm/simple.nix
2019-02-27 14:18:38 +01:00
./istio/bookinfo.nix
./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