nixpkgs/nixos/tests/nginx-variants.nix
Jamie McClymont 4864ab4099 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
2025-08-13 22:32:17 +10:00

37 lines
820 B
Nix

{ pkgs, runTest, ... }:
builtins.listToAttrs (
builtins.map
(packageName: {
name = packageName;
value = runTest {
name = "nginx-variant-${packageName}";
nodes.machine =
{ pkgs, ... }:
{
services.nginx = {
enable = true;
virtualHosts.localhost.locations."/".return = "200 'foo'";
package = pkgs.${packageName};
};
};
testScript = ''
machine.wait_for_unit("nginx")
machine.wait_for_open_port(80)
machine.succeed('test "$(curl -fvvv http://localhost/)" = foo')
'';
};
})
[
"angie"
"angieQuic"
"nginxStable"
"nginxMainline"
"nginxQuic"
"nginxShibboleth"
"openresty"
"tengine"
]
)