2011-08-26 10:17:24 +00:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
nodes = {
|
2011-09-14 18:20:50 +00:00
|
|
|
server =
|
2011-08-26 10:17:24 +00:00
|
|
|
{ pkgs, config, ... }:
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2011-08-26 10:17:24 +00:00
|
|
|
{
|
|
|
|
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";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2011-08-26 10:17:24 +00:00
|
|
|
client = { };
|
|
|
|
};
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2011-08-26 10:17:24 +00:00
|
|
|
testScript = ''
|
|
|
|
startAll;
|
|
|
|
|
|
|
|
$server->waitForJob("tomcat");
|
|
|
|
$server->sleep(30); # Dirty, but it takes a while before Tomcat handles to requests properly
|
2011-08-29 14:23:26 +00:00
|
|
|
$client->waitForJob("network-interfaces");
|
|
|
|
$client->succeed("curl --fail http://server/examples/servlets/servlet/HelloWorldExample");
|
|
|
|
$client->succeed("curl --fail http://server/examples/jsp/jsp2/simpletag/hello.jsp");
|
2011-08-26 10:17:24 +00:00
|
|
|
'';
|
|
|
|
}
|