Added testcase for Tomcat, with HTTP proxy

svn path=/nixos/trunk/; revision=28824
This commit is contained in:
Sander van der Burg 2011-08-26 10:17:24 +00:00
parent ea4630bf97
commit abfdab0d3e
3 changed files with 33 additions and 0 deletions

View File

@ -181,6 +181,7 @@ let
quake3 = t.quake3.report;
remote_builds = t.remote_builds.test;
#subversion = t.subversion.report;
tomcat = t.tomcat.test;
trac = t.trac.test;
xfce = t.xfce.test;
};

View File

@ -25,6 +25,7 @@ with import ../lib/testing.nix { inherit nixpkgs system; };
remote_builds = makeTest (import ./remote-builds.nix);
simple = makeTest (import ./simple.nix);
#subversion = makeTest (import ./subversion.nix);
tomcat = makeTest (import ./tomcat.nix);
trac = makeTest (import ./trac.nix);
xfce = makeTest (import ./xfce.nix);
}

31
tests/tomcat.nix Normal file
View File

@ -0,0 +1,31 @@
{ 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->waitForJob("tomcat");
$server->sleep(30); # Dirty, but it takes a while before Tomcat handles to requests properly
$client->mustSucceed("curl --fail http://server/examples/servlets/servlet/HelloWorldExample");
$client->mustSucceed("curl --fail http://server/examples/jsp/jsp2/simpletag/hello.jsp");
'';
}