diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-11-30 22:38:56 +0100 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2020-12-17 21:52:24 +0100 |
commit | 767d80099cd8418b3cc7338eb24f9217fedb6449 (patch) | |
tree | dc6af45088e2c6f2e5fefa63034f7077f350ad6f /lib/tests/modules/assertions/underscore-attributes.nix | |
parent | 991dfccbd1935aabb76a20245ca0108aadd38f3c (diff) |
lib/modules: Introduce _module.checks.*.check
Previously the .enable option was used to encode the condition as well, which lead to some oddness: - In order to encode an assertion, one had to invert it - To disable a check, one had to mkForce it By introducing a separate .check option this is solved because: - It can be used to encode assertions - Disabling is done separately with .enable option, whose default can be overridden without a mkForce
Diffstat (limited to 'lib/tests/modules/assertions/underscore-attributes.nix')
-rw-r--r-- | lib/tests/modules/assertions/underscore-attributes.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tests/modules/assertions/underscore-attributes.nix b/lib/tests/modules/assertions/underscore-attributes.nix index c28c9dcd9180e..f9ee5c5787b08 100644 --- a/lib/tests/modules/assertions/underscore-attributes.nix +++ b/lib/tests/modules/assertions/underscore-attributes.nix @@ -1,7 +1,7 @@ { _module.checks._test = { - enable = true; + check = false; message = "Assertion failed"; }; |