mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
fmt
This commit is contained in:
parent
c3fa598922
commit
db6d83c61e
53 changed files with 1916 additions and 1599 deletions
|
|
@ -1,7 +1,6 @@
|
|||
{ lib, config, testing, kubenix, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
modules = [
|
||||
# testing module
|
||||
|
|
@ -36,25 +35,29 @@ let
|
|||
|
||||
# defaults that can be applied on tests
|
||||
defaults =
|
||||
filter (d:
|
||||
(intersectLists d.features testFeatures) == d.features ||
|
||||
(length d.features) == 0
|
||||
) testing.defaults;
|
||||
filter
|
||||
(d:
|
||||
(intersectLists d.features testFeatures) == d.features ||
|
||||
(length d.features) == 0
|
||||
)
|
||||
testing.defaults;
|
||||
|
||||
# add default modules to all modules
|
||||
modulesWithDefaults = modules ++ (map (d: d.default) defaults);
|
||||
|
||||
# evaled test
|
||||
evaled = let
|
||||
evaled' = kubenix.evalModules {
|
||||
modules = modulesWithDefaults;
|
||||
};
|
||||
in
|
||||
evaled =
|
||||
let
|
||||
evaled' = kubenix.evalModules {
|
||||
modules = modulesWithDefaults;
|
||||
};
|
||||
in
|
||||
if testing.throwError then evaled'
|
||||
else if (builtins.tryEval evaled'.config.test.assertions).success
|
||||
then evaled' else null;
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
module = mkOption {
|
||||
description = "Module defining kubenix test";
|
||||
|
|
@ -97,7 +100,7 @@ in {
|
|||
description = "Test result";
|
||||
type = types.unspecified;
|
||||
internal = true;
|
||||
default = [];
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
script = mkOption {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue