mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
Merge pull request #131754 from blaggacao/fix-testing-invalid-node-names
nixos/testing: fix invalid node names detection
This commit is contained in:
commit
fae7252ec5
1 changed files with 7 additions and 2 deletions
|
@ -130,9 +130,12 @@ rec {
|
||||||
|
|
||||||
nodeHostNames = map (c: c.config.system.name) (lib.attrValues nodes);
|
nodeHostNames = map (c: c.config.system.name) (lib.attrValues nodes);
|
||||||
|
|
||||||
|
# TODO: This is an implementation error and needs fixing
|
||||||
|
# the testing famework cannot legitimately restrict hostnames further
|
||||||
|
# beyond RFC1035
|
||||||
invalidNodeNames = lib.filter
|
invalidNodeNames = lib.filter
|
||||||
(node: builtins.match "^[A-z_]([A-z0-9_]+)?$" node == null)
|
(node: builtins.match "^[A-z_]([A-z0-9_]+)?$" node == null)
|
||||||
(builtins.attrNames nodes);
|
nodeHostNames;
|
||||||
|
|
||||||
testScript' =
|
testScript' =
|
||||||
# Call the test script with the computed nodes.
|
# Call the test script with the computed nodes.
|
||||||
|
@ -146,7 +149,9 @@ rec {
|
||||||
Cannot create machines out of (${lib.concatStringsSep ", " invalidNodeNames})!
|
Cannot create machines out of (${lib.concatStringsSep ", " invalidNodeNames})!
|
||||||
All machines are referenced as python variables in the testing framework which will break the
|
All machines are referenced as python variables in the testing framework which will break the
|
||||||
script when special characters are used.
|
script when special characters are used.
|
||||||
Please stick to alphanumeric chars and underscores as separation.
|
|
||||||
|
This is an IMPLEMENTATION ERROR and needs to be fixed. Meanwhile,
|
||||||
|
please stick to alphanumeric chars and underscores as separation.
|
||||||
''
|
''
|
||||||
else lib.warnIf skipLint "Linting is disabled" (runCommand testDriverName
|
else lib.warnIf skipLint "Linting is disabled" (runCommand testDriverName
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue