mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
33 lines
837 B
Nix
33 lines
837 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
nodes = {
|
|
server =
|
|
{ pkgs, config, ... }:
|
|
|
|
{
|
|
services.tomcat.enable = true;
|
|
services.httpd.enable = true;
|
|
services.httpd.adminAddr = "foo@bar.com";
|
|
services.httpd.extraSubservices = [
|
|
{ serviceType = "tomcat-connector";
|
|
stateDir = "/var/run/httpd";
|
|
logDir = "/var/log/httpd";
|
|
}
|
|
];
|
|
};
|
|
|
|
client = { };
|
|
};
|
|
|
|
testScript = ''
|
|
startAll;
|
|
|
|
$server->waitForUnit("tomcat");
|
|
$server->sleep(30); # Dirty, but it takes a while before Tomcat handles to requests properly
|
|
$client->waitForUnit("network.target");
|
|
$client->succeed("curl --fail http://server/examples/servlets/servlet/HelloWorldExample");
|
|
$client->succeed("curl --fail http://server/examples/jsp/jsp2/simpletag/hello.jsp");
|
|
'';
|
|
}
|