ref: throwError -> doThrowError

Follow somewhat the nixpkgs conventions for bool flags
This commit is contained in:
David Arnold 2021-06-01 09:59:52 -05:00 committed by "David Arnold"
parent b29d3a11b2
commit 806a3d759e
No known key found for this signature in database
GPG key ID: 6D6A936E69C59D08
3 changed files with 4 additions and 5 deletions

View file

@ -33,7 +33,7 @@ in
default = "default";
};
throwError = mkOption {
doThrowError = mkOption {
description = "Whether to throw error";
type = types.bool;
default = true;

View file

@ -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;

View file

@ -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