2015-07-12 12:09:40 +02:00
|
|
|
import ./make-test.nix ({ pkgs, ...} : {
|
2014-06-28 16:04:49 +02:00
|
|
|
name = "tomcat";
|
2015-07-12 12:09:40 +02:00
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
2019-02-22 16:14:13 +01:00
|
|
|
maintainers = [ eelco ];
|
2015-07-12 12:09:40 +02:00
|
|
|
};
|
2011-08-26 12:17:24 +02:00
|
|
|
|
|
|
|
nodes = {
|
2011-09-14 20:20:50 +02:00
|
|
|
server =
|
2018-07-20 22:56:59 +02:00
|
|
|
{ ... }:
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2014-04-11 17:15:56 +02:00
|
|
|
{ services.tomcat.enable = true;
|
2011-08-26 12:17:24 +02:00
|
|
|
services.httpd.enable = true;
|
|
|
|
services.httpd.adminAddr = "foo@bar.com";
|
2014-04-11 17:15:56 +02:00
|
|
|
services.httpd.extraSubservices =
|
|
|
|
[ { serviceType = "tomcat-connector"; } ];
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
2011-08-26 12:17:24 +02:00
|
|
|
};
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2011-08-26 12:17:24 +02:00
|
|
|
client = { };
|
|
|
|
};
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2011-08-26 12:17:24 +02:00
|
|
|
testScript = ''
|
|
|
|
startAll;
|
|
|
|
|
2012-10-24 18:22:53 +02:00
|
|
|
$server->waitForUnit("tomcat");
|
|
|
|
$client->waitForUnit("network.target");
|
2016-09-13 21:56:27 +02:00
|
|
|
$client->waitUntilSucceeds("curl --fail http://server/examples/servlets/servlet/HelloWorldExample");
|
|
|
|
$client->waitUntilSucceeds("curl --fail http://server/examples/jsp/jsp2/simpletag/hello.jsp");
|
2011-08-26 12:17:24 +02:00
|
|
|
'';
|
2015-07-12 12:09:40 +02:00
|
|
|
})
|