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";
|
||||
};
|
||||
|
||||
throwError = mkOption {
|
||||
doThrowError = mkOption {
|
||||
description = "Whether to throw error";
|
||||
type = types.bool;
|
||||
default = true;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ let
|
|||
modules = modulesWithCommonOptions;
|
||||
};
|
||||
in
|
||||
if testing.throwError then evaled'
|
||||
if testing.doThrowError then evaled'
|
||||
else if (builtins.tryEval evaled'.config.test.assertions).success
|
||||
then evaled' else null;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
{ k8sVersion ? "1.21"
|
||||
, 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
|
||||
}:
|
||||
|
||||
|
|
@ -17,9 +17,8 @@ let
|
|||
imports = [ kubenix.modules.testing ];
|
||||
|
||||
testing = {
|
||||
inherit doThrowError enabledTests;
|
||||
name = "kubenix-${k8sVersion}";
|
||||
throwError = throwError;
|
||||
enabledTests = enabledTests;
|
||||
tests = [
|
||||
./k8s/simple.nix
|
||||
./k8s/deployment.nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue