nixpkgs/nixos/tests/tomcat.nix
Reno Reckling 8ea8659f29 Remove tomcat vm test timing issues
(cherry picked from commit 090f1f0722b79cbba5f0abccac61496398789762)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-09-13 22:46:46 +02:00

30 lines
840 B
Nix

import ./make-test.nix ({ pkgs, ...} : {
name = "tomcat";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ eelco chaoflow ];
};
nodes = {
server =
{ pkgs, config, ... }:
{ services.tomcat.enable = true;
services.httpd.enable = true;
services.httpd.adminAddr = "foo@bar.com";
services.httpd.extraSubservices =
[ { serviceType = "tomcat-connector"; } ];
networking.firewall.allowedTCPPorts = [ 80 ];
};
client = { };
};
testScript = ''
startAll;
$server->waitForUnit("tomcat");
$client->waitForUnit("network.target");
$client->waitUntilSucceeds("curl --fail http://server/examples/servlets/servlet/HelloWorldExample");
$client->waitUntilSucceeds("curl --fail http://server/examples/jsp/jsp2/simpletag/hello.jsp");
'';
})