forked from mirrors/nixpkgs
Added testcase for Tomcat, with HTTP proxy
svn path=/nixos/trunk/; revision=28824
This commit is contained in:
parent
ea4630bf97
commit
abfdab0d3e
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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
31
tests/tomcat.nix
Normal 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");
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue