mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 10:14:48 +00:00
nixos/lib/testing: `builtins.length (lib.attrNames ...) > 0 -> != to the empty set
(cherry picked from commit 244057cf9f)
This commit is contained in:
committed by
github-actions[bot]
parent
44b4e8026b
commit
2922dea563
@@ -35,8 +35,7 @@ let
|
||||
options = {
|
||||
devnet = mkOption {
|
||||
type = types.bool;
|
||||
default =
|
||||
builtins.length (lib.attrNames containers) > 0 && builtins.length (lib.attrNames nodes) > 0;
|
||||
default = containers != { } && nodes != { };
|
||||
defaultText = lib.literalMD "`true` if both VMs and containers are present.";
|
||||
description = ''
|
||||
This heuristic setting that assumes that the majority of tests requires VMs and containers
|
||||
@@ -52,7 +51,7 @@ let
|
||||
};
|
||||
uid-range = mkOption {
|
||||
type = types.bool;
|
||||
default = builtins.length (lib.attrNames containers) > 0;
|
||||
default = containers != { };
|
||||
defaultText = lib.literalMD "`true` if containers are present.";
|
||||
description = "Containers use systemd-nspawn, which requires pid 0 inside of the sandbox. `uid-range` enables that.";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user