nixpkgs-suyu/nixos/tests/tomcat.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
759 B
Nix
Raw Normal View History

import ./make-test-python.nix ({ pkgs, ... }: {
name = "tomcat";
2022-03-21 00:15:30 +01:00
nodes.machine = { pkgs, ... }: {
services.tomcat = {
enable = true;
axis2.enable = true;
};
};
testScript = ''
machine.wait_for_unit("tomcat.service")
machine.wait_for_open_port(8080)
machine.wait_for_file("/var/tomcat/webapps/examples");
machine.succeed(
"curl -sS --fail http://localhost:8080/examples/servlets/servlet/HelloWorldExample | grep 'Hello World!'"
)
machine.succeed(
"curl -sS --fail http://localhost:8080/examples/jsp/jsp2/simpletag/hello.jsp | grep 'Hello, world!'"
)
machine.succeed(
"curl -sS --fail http://localhost:8080/axis2/axis2-web/HappyAxis.jsp | grep 'Found Axis2'"
)
'';
})