diff options
author | Patrick Hilhorst <git@hilhorst.be> | 2021-11-19 23:02:30 +0100 |
---|---|---|
committer | Patrick Hilhorst <git@hilhorst.be> | 2021-11-19 23:02:30 +0100 |
commit | 9e71014edecba9d9c78531ebc2861e28c931ff6f (patch) | |
tree | 78e1302d3c8736536789a4fb6697159c60bff694 /nixos/lib/testing-python.nix | |
parent | a8f693ed48e64fd5d4b6ae2304962e387227bbd4 (diff) |
test-driver.py: always export single machine as 'machine'
Diffstat (limited to 'nixos/lib/testing-python.nix')
-rw-r--r-- | nixos/lib/testing-python.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index cce017a6441db..4306d102b2d64 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -134,7 +134,9 @@ rec { vlans = map (m: m.config.virtualisation.vlans) (lib.attrValues nodes); vms = map (m: m.config.system.build.vm) (lib.attrValues nodes); - nodeHostNames = map (c: c.config.system.name) (lib.attrValues nodes); + nodeHostNames = let + nodesList = map (c: c.config.system.name) (lib.attrValues nodes); + in nodesList ++ lib.optional (lib.length nodesList == 1) "machine"; # TODO: This is an implementation error and needs fixing # the testing famework cannot legitimately restrict hostnames further |