ttaenc: init at 3.4.1 (#238757)
[NixPkgs.git] / nixos / tests / tomcat.nix
blob6d8b9f496454e636e298d9a089979fdd1c58ab7e
1 import ./make-test-python.nix (
2   { lib, pkgs, ... }:
3   {
4     name = "tomcat";
5     meta.maintainers = [ lib.maintainers.anthonyroussel ];
7     nodes.machine =
8       { pkgs, ... }:
9       {
10         services.tomcat = {
11           enable = true;
12           port = 8001;
13           axis2.enable = true;
14         };
15       };
17     testScript = ''
18       machine.wait_for_unit("tomcat.service")
19       machine.wait_for_open_port(8001)
20       machine.wait_for_file("/var/tomcat/webapps/examples");
22       machine.succeed(
23           "curl -sS --fail http://localhost:8001/examples/servlets/servlet/HelloWorldExample | grep 'Hello World!'"
24       )
25       machine.succeed(
26           "curl -sS --fail http://localhost:8001/examples/jsp/jsp2/simpletag/hello.jsp | grep 'Hello, world!'"
27       )
28       machine.succeed(
29           "curl -sS --fail http://localhost:8001/axis2/axis2-web/HappyAxis.jsp | grep 'Found Axis2'"
30       )
31     '';
32   }