about summary refs log tree commit diff
path: root/lib/tests/modules
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2020-11-30 21:42:52 +0100
committerSilvan Mosberger <contact@infinisil.com>2020-11-30 23:51:42 +0100
commit8dea4df90323c43f9cc86a629f1581b91866e11d (patch)
tree7d426d12e78ca4120c2fc50c094f719112eeedc4 /lib/tests/modules
parentc9cc8969b4d4adeb389837d1cc85cc73a8272f55 (diff)
lib/modules: Remove _module.checks.*.triggerPath as it's not necessary
Previously this option was thought to be necessary to avoid infinite
recursion, but it actually isn't, since the check evaluation isn't fed
back into the module fixed-point.
Diffstat (limited to 'lib/tests/modules')
-rw-r--r--lib/tests/modules/assertions/enable-lazy.nix17
-rw-r--r--lib/tests/modules/assertions/non-cascading.nix17
-rw-r--r--lib/tests/modules/assertions/trigger-lazy.nix15
-rw-r--r--lib/tests/modules/assertions/trigger-submodule.nix18
4 files changed, 0 insertions, 67 deletions
diff --git a/lib/tests/modules/assertions/enable-lazy.nix b/lib/tests/modules/assertions/enable-lazy.nix
deleted file mode 100644
index e25190228649c..0000000000000
--- a/lib/tests/modules/assertions/enable-lazy.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ lib, ... }: {
-
-  options.foo = lib.mkOption {
-    default = true;
-  };
-
-  options.bar = lib.mkOption {
-    default = true;
-  };
-
-  config._module.checks.test = {
-    enable = throw "enable evaluated";
-    message = "Assertion failed";
-    triggerPath = [ "foo" ];
-  };
-
-}
diff --git a/lib/tests/modules/assertions/non-cascading.nix b/lib/tests/modules/assertions/non-cascading.nix
deleted file mode 100644
index 7b9e333a11a83..0000000000000
--- a/lib/tests/modules/assertions/non-cascading.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ lib, config, ... }: {
-
-  options.foo = lib.mkOption {
-    default = true;
-  };
-
-  options.bar = lib.mkOption {
-    default = config.foo;
-  };
-
-  config._module.checks.foo = {
-    enable = true;
-    message = "Foo assertion";
-    triggerPath = [ "foo" ];
-  };
-
-}
diff --git a/lib/tests/modules/assertions/trigger-lazy.nix b/lib/tests/modules/assertions/trigger-lazy.nix
deleted file mode 100644
index 9e9e3683b0cd5..0000000000000
--- a/lib/tests/modules/assertions/trigger-lazy.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ lib, ... }: {
-  options.foo = lib.mkOption {
-    default = true;
-  };
-
-  options.bar = lib.mkOption {
-    default = true;
-  };
-
-  config._module.checks.test = {
-    enable = true;
-    message = "Assertion failed";
-    triggerPath = [ "foo" ];
-  };
-}
diff --git a/lib/tests/modules/assertions/trigger-submodule.nix b/lib/tests/modules/assertions/trigger-submodule.nix
deleted file mode 100644
index 27deb48e4a9f4..0000000000000
--- a/lib/tests/modules/assertions/trigger-submodule.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ lib, ... }: {
-
-  options.foo = lib.mkOption {
-    default = { bar = {}; };
-    type = lib.types.attrsOf (lib.types.submodule {
-      options.baz = lib.mkOption {
-        default = true;
-      };
-    });
-  };
-
-  config._module.checks.test = {
-    enable = true;
-    message = "Assertion failed";
-    triggerPath = [ "foo" "bar" "baz" ];
-  };
-
-}