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