2011-08-26 14:17:24 +04:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
nodes = {
|
2011-09-14 22:20:50 +04:00
|
|
|
server =
|
2011-08-26 14:17:24 +04:00
|
|
|
{ pkgs, config, ... }:
|
2011-09-14 22:20:50 +04:00
|
|
|
|
2011-08-26 14:17:24 +04:00
|
|
|
{
|
|
|
|
services.tomcat.enable = true;
|
|
|
|
services.httpd.enable = true;
|
|
|
|
services.httpd.adminAddr = "foo@bar.com";
|
|
|
|
services.httpd.extraSubservices = [
|
2013-10-29 04:26:51 +04:00
|
|
|
{ serviceType = "tomcat-connector"; }
|
2011-08-26 14:17:24 +04:00
|
|
|
];
|
|
|
|
};
|
2011-09-14 22:20:50 +04:00
|
|
|
|
2011-08-26 14:17:24 +04:00
|
|
|
client = { };
|
|
|
|
};
|
2011-09-14 22:20:50 +04:00
|
|
|
|
2011-08-26 14:17:24 +04:00
|
|
|
testScript = ''
|
|
|
|
startAll;
|
|
|
|
|
2012-10-24 20:22:53 +04:00
|
|
|
$server->waitForUnit("tomcat");
|
2011-08-26 14:17:24 +04:00
|
|
|
$server->sleep(30); # Dirty, but it takes a while before Tomcat handles to requests properly
|
2012-10-24 20:22:53 +04:00
|
|
|
$client->waitForUnit("network.target");
|
2011-08-29 18:23:26 +04:00
|
|
|
$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 14:17:24 +04:00
|
|
|
'';
|
|
|
|
}
|