Skip to content

Commit

Permalink
nixos/python-test-driver: allow single char as hostName and fix misle…
Browse files Browse the repository at this point in the history
…ading error-message

In case of invalid chars, the error-message references "perl variables"
which is not the case here as the python-based framework is used.
  • Loading branch information
Ma27 committed Mar 13, 2020
1 parent ed1db01 commit 6d14bac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nixos/lib/testing-python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ in rec {

nodeNames = builtins.attrNames nodes;
invalidNodeNames = lib.filter
(node: builtins.match "^[A-z_][A-z0-9_]+$" node == null) nodeNames;
(node: builtins.match "^[A-z_]([A-z0-9_]+)?$" node == null) nodeNames;

in
if lib.length invalidNodeNames > 0 then
throw ''
Cannot create machines out of (${lib.concatStringsSep ", " invalidNodeNames})!
All machines are referenced as perl 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.
Please stick to alphanumeric chars and underscores as separation.
Expand Down

0 comments on commit 6d14bac

Please sign in to comment.