Author: sandervanderburg
Date: Fri Aug 26 10:17:24 2011
New Revision: 28824
URL: https://svn.nixos.org/websvn/nix/?rev=28824&sc=1
Log:
Added testcase for Tomcat, with HTTP proxy
Added:
nixos/trunk/tests/tomcat.nix
Modified:
nixos/trunk/release.nix
nixos/trunk/tests/default.nix
Modified: nixos/trunk/release.nix
==============================================================================
--- nixos/trunk/release.nix Fri Aug 26 09:54:46 2011 (r28823)
+++ nixos/trunk/release.nix Fri Aug 26 10:17:24 2011 (r28824)
@@ -181,6 +181,7 @@
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;
};
Modified: nixos/trunk/tests/default.nix
==============================================================================
--- nixos/trunk/tests/default.nix Fri Aug 26 09:54:46 2011 (r28823)
+++ nixos/trunk/tests/default.nix Fri Aug 26 10:17:24 2011 (r28824)
@@ -25,6 +25,7 @@
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);
}
Added: nixos/trunk/tests/tomcat.nix
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixos/trunk/tests/tomcat.nix Fri Aug 26 10:17:24 2011 (r28824)
@@ -0,0 +1,31 @@
+{ pkgs, ... }:
+
+{
+ nodes = {
+ server =
+ { pkgs, config, ... }:
+
+ {
+ services.tomcat.enable = true;
+ services.httpd.enable = true;
+ services.httpd.adminAddr = "[email protected]";
+ 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");
+ '';
+}
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits