mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{ pkgs ? import <nixpkgs> {}
|
|
, lib ? pkgs.lib
|
|
, kubenix ? import ../. { inherit pkgs lib; }
|
|
, k8sVersion ? "1.13"
|
|
, nixosPath ? toString <nixpkgs/nixos>
|
|
|
|
# whether any testing error should throw an error
|
|
, throwError ? true
|
|
, e2e ? true }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
images = pkgs.callPackage ./images.nix {};
|
|
|
|
test = (kubenix.evalModules {
|
|
modules = [
|
|
kubenix.modules.testing
|
|
|
|
{
|
|
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
|
|
./k8s/order.nix
|
|
./k8s/submodule.nix
|
|
./k8s/imports.nix
|
|
./helm/simple.nix
|
|
./istio/bookinfo.nix
|
|
./submodules/simple.nix
|
|
./submodules/defaults.nix
|
|
./submodules/versioning.nix
|
|
];
|
|
testing.args = {
|
|
inherit images k8sVersion;
|
|
};
|
|
}
|
|
];
|
|
args = {
|
|
inherit pkgs;
|
|
};
|
|
specialArgs = {
|
|
inherit kubenix nixosPath;
|
|
};
|
|
}).config;
|
|
in pkgs.recurseIntoAttrs test.testing
|