2020-06-02 08:01:03 +03:00
|
|
|
{ system ? builtins.currentSystem,
|
|
|
|
config ? {},
|
|
|
|
pkgs ? import ../.. { inherit system config; }
|
|
|
|
}:
|
|
|
|
|
|
|
|
with import ../lib/testing-python.nix { inherit system pkgs; };
|
|
|
|
|
|
|
|
builtins.listToAttrs (
|
|
|
|
builtins.map
|
|
|
|
(nginxName:
|
|
|
|
{
|
|
|
|
name = nginxName;
|
|
|
|
value = makeTest {
|
|
|
|
name = "nginx-variant-${nginxName}";
|
|
|
|
|
2022-03-21 02:15:30 +03:00
|
|
|
nodes.machine = { pkgs, ... }: {
|
2020-06-02 08:01:03 +03:00
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
virtualHosts.localhost.locations."/".return = "200 'foo'";
|
|
|
|
package = pkgs."${nginxName}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
machine.wait_for_unit("nginx")
|
|
|
|
machine.wait_for_open_port(80)
|
|
|
|
machine.succeed('test "$(curl -fvvv http://localhost/)" = foo')
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
)
|
2021-07-09 00:43:58 +03:00
|
|
|
[ "nginxStable" "nginxMainline" "nginxQuic" "nginxShibboleth" "openresty" "tengine" ]
|
2020-06-02 08:01:03 +03:00
|
|
|
)
|