nixos/tests/nginx-variants: bring back handling of duplicate package names

Partially reverts 86efccfa45

Package names are non-unique, so tests were being silently dropped
from the attrset
This commit is contained in:
Jamie McClymont
2025-08-13 22:23:54 +10:00
parent b0b7681222
commit 4864ab4099

View File

@@ -1,10 +1,10 @@
{ pkgs, runTest, ... }: { pkgs, runTest, ... }:
builtins.listToAttrs ( builtins.listToAttrs (
builtins.map builtins.map
(nginxPackage: { (packageName: {
name = pkgs.lib.getName nginxPackage; name = packageName;
value = runTest { value = runTest {
name = "nginx-variant-${pkgs.lib.getName nginxPackage}"; name = "nginx-variant-${packageName}";
nodes.machine = nodes.machine =
{ pkgs, ... }: { pkgs, ... }:
@@ -12,7 +12,7 @@ builtins.listToAttrs (
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts.localhost.locations."/".return = "200 'foo'"; virtualHosts.localhost.locations."/".return = "200 'foo'";
package = nginxPackage; package = pkgs.${packageName};
}; };
}; };
@@ -24,13 +24,13 @@ builtins.listToAttrs (
}; };
}) })
[ [
pkgs.angie "angie"
pkgs.angieQuic "angieQuic"
pkgs.nginxStable "nginxStable"
pkgs.nginxMainline "nginxMainline"
pkgs.nginxQuic "nginxQuic"
pkgs.nginxShibboleth "nginxShibboleth"
pkgs.openresty "openresty"
pkgs.tengine "tengine"
] ]
) )