diff --git a/release.nix b/release.nix index 6f2807652ca8..d3c6308197fc 100644 --- a/release.nix +++ b/release.nix @@ -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; }; diff --git a/tests/default.nix b/tests/default.nix index 767732b53b4f..e8c2e348b2ba 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -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); } diff --git a/tests/tomcat.nix b/tests/tomcat.nix new file mode 100644 index 000000000000..a6a60ba72fc3 --- /dev/null +++ b/tests/tomcat.nix @@ -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"); + ''; +}