diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2023-12-10 13:49:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-10 13:49:02 +0100 |
commit | d56f942e438a2c6df80f9ac7696041174ddbf261 (patch) | |
tree | 68b08e1f68ed371d2549140439fe7352095bc30b /lib/tests/modules.sh | |
parent | d826a919f9210f10354909099829e04fb2c0bdef (diff) | |
parent | 83712164e6eafcfbc80e290c62cd8adc9cdd0168 (diff) |
Merge pull request #272709 from hercules-ci/module-system-test-pr-131205
lib/modules: Test optionless module errors from #131205
Diffstat (limited to 'lib/tests/modules.sh')
-rwxr-xr-x | lib/tests/modules.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 0eb976c1f4978..4cf9821a30635 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -94,6 +94,14 @@ checkConfigOutput '^true$' config.result ./module-argument-default.nix # gvariant checkConfigOutput '^true$' config.assertion ./gvariant.nix +# https://github.com/NixOS/nixpkgs/pull/131205 +# We currently throw this error already in `config`, but throwing in `config.wrong1` would be acceptable. +checkConfigError 'It seems as if you.re trying to declare an option by placing it into .config. rather than .options.' config.wrong1 ./error-mkOption-in-config.nix +# We currently throw this error already in `config`, but throwing in `config.nest.wrong2` would be acceptable. +checkConfigError 'It seems as if you.re trying to declare an option by placing it into .config. rather than .options.' config.nest.wrong2 ./error-mkOption-in-config.nix +checkConfigError 'The option .sub.wrong2. does not exist. Definition values:' config.sub ./error-mkOption-in-submodule-config.nix +checkConfigError '.*This can happen if you e.g. declared your options in .types.submodule.' config.sub ./error-mkOption-in-submodule-config.nix + # types.pathInStore checkConfigOutput '".*/store/0lz9p8xhf89kb1c1kk6jxrzskaiygnlh-bash-5.2-p15.drv"' config.pathInStore.ok1 ./types.nix checkConfigOutput '".*/store/0fb3ykw9r5hpayd05sr0cizwadzq1d8q-bash-5.2-p15"' config.pathInStore.ok2 ./types.nix |