mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
ref: throwError -> doThrowError
Follow somewhat the nixpkgs conventions for bool flags
This commit is contained in:
parent
b29d3a11b2
commit
806a3d759e
3 changed files with 4 additions and 5 deletions
|
|
@ -33,7 +33,7 @@ in
|
||||||
default = "default";
|
default = "default";
|
||||||
};
|
};
|
||||||
|
|
||||||
throwError = mkOption {
|
doThrowError = mkOption {
|
||||||
description = "Whether to throw error";
|
description = "Whether to throw error";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ let
|
||||||
modules = modulesWithCommonOptions;
|
modules = modulesWithCommonOptions;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
if testing.throwError then evaled'
|
if testing.doThrowError then evaled'
|
||||||
else if (builtins.tryEval evaled'.config.test.assertions).success
|
else if (builtins.tryEval evaled'.config.test.assertions).success
|
||||||
then evaled' else null;
|
then evaled' else null;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
{ k8sVersion ? "1.21"
|
{ k8sVersion ? "1.21"
|
||||||
, registry ? throw "Registry url not defined"
|
, registry ? throw "Registry url not defined"
|
||||||
, throwError ? true # whether any testing error should throw an error
|
, doThrowError ? true # whether any testing error should throw an error
|
||||||
, enabledTests ? null
|
, enabledTests ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
@ -17,9 +17,8 @@ let
|
||||||
imports = [ kubenix.modules.testing ];
|
imports = [ kubenix.modules.testing ];
|
||||||
|
|
||||||
testing = {
|
testing = {
|
||||||
|
inherit doThrowError enabledTests;
|
||||||
name = "kubenix-${k8sVersion}";
|
name = "kubenix-${k8sVersion}";
|
||||||
throwError = throwError;
|
|
||||||
enabledTests = enabledTests;
|
|
||||||
tests = [
|
tests = [
|
||||||
./k8s/simple.nix
|
./k8s/simple.nix
|
||||||
./k8s/deployment.nix
|
./k8s/deployment.nix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue