nixpkgs/nixos/tests/nginx-variants.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1,023 B
Nix
Raw Normal View History

{
system ? builtins.currentSystem,
config ? { },
pkgs ? import ../.. { inherit system config; },
}:
with import ../lib/testing-python.nix { inherit system pkgs; };
builtins.listToAttrs (
builtins.map
2023-11-20 23:04:20 +03:00
(nginxPackage: {
name = pkgs.lib.getName nginxPackage;
value = makeTest {
2023-11-20 23:04:20 +03:00
name = "nginx-variant-${pkgs.lib.getName nginxPackage}";
2022-03-21 00:15:30 +01:00
nodes.machine =
{ pkgs, ... }:
{
services.nginx = {
enable = true;
virtualHosts.localhost.locations."/".return = "200 'foo'";
2023-11-20 23:04:20 +03:00
package = nginxPackage;
};
};
testScript = ''
machine.wait_for_unit("nginx")
machine.wait_for_open_port(80)
machine.succeed('test "$(curl -fvvv http://localhost/)" = foo')
'';
};
})
2023-11-20 23:04:20 +03:00
[
pkgs.angie
pkgs.angieQuic
pkgs.nginxStable
pkgs.nginxMainline
pkgs.nginxQuic
pkgs.nginxShibboleth
pkgs.openresty
pkgs.tengine
]
)