mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-13 16:40:05 +01:00
feat: run test for all k8s versions
This commit is contained in:
parent
fde2d5557c
commit
0d68a401f0
3 changed files with 25 additions and 3 deletions
|
|
@ -4,6 +4,7 @@ with lib;
|
|||
|
||||
let
|
||||
cfg = config.testing;
|
||||
parentConfig = config;
|
||||
in {
|
||||
options = {
|
||||
testing.throwError = mkOption {
|
||||
|
|
@ -12,13 +13,22 @@ in {
|
|||
default = true;
|
||||
};
|
||||
|
||||
testing.defaults = mkOption {
|
||||
description = "Testing defaults";
|
||||
type = types.coercedTo types.unspecified (value: [value]) (types.listOf types.unspecified);
|
||||
example = literalExample ''{config, ...}: {
|
||||
kubernetes.version = config.kubernetes.version;
|
||||
}'';
|
||||
default = [];
|
||||
};
|
||||
|
||||
testing.tests = mkOption {
|
||||
description = "Attribute set of test cases";
|
||||
default = [];
|
||||
type = types.listOf (types.coercedTo types.path (module: {inherit module;}) (types.submodule ({config, ...}: let
|
||||
modules = [config.module ./test.nix {
|
||||
config._module.args.test = config;
|
||||
}];
|
||||
}] ++ cfg.defaults;
|
||||
|
||||
test = (kubenix.evalKubernetesModules {
|
||||
check = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue