2023-10-26 11:01:09 +02:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
2022-03-13 14:31:43 +01:00
|
|
|
name = "tomcat";
|
2023-11-29 07:56:25 +01:00
|
|
|
meta.maintainers = [ lib.maintainers.anthonyroussel ];
|
2022-03-13 14:31:43 +01:00
|
|
|
|
2022-03-21 00:15:30 +01:00
|
|
|
nodes.machine = { pkgs, ... }: {
|
2023-10-26 11:01:09 +02:00
|
|
|
services.tomcat = {
|
|
|
|
enable = true;
|
|
|
|
axis2.enable = true;
|
|
|
|
};
|
2022-03-13 14:31:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
machine.wait_for_unit("tomcat.service")
|
|
|
|
machine.wait_for_open_port(8080)
|
|
|
|
machine.wait_for_file("/var/tomcat/webapps/examples");
|
2023-10-26 11:01:09 +02:00
|
|
|
|
|
|
|
machine.succeed(
|
|
|
|
"curl -sS --fail http://localhost:8080/examples/servlets/servlet/HelloWorldExample | grep 'Hello World!'"
|
|
|
|
)
|
2022-03-13 14:31:43 +01:00
|
|
|
machine.succeed(
|
2023-10-26 11:01:09 +02:00
|
|
|
"curl -sS --fail http://localhost:8080/examples/jsp/jsp2/simpletag/hello.jsp | grep 'Hello, world!'"
|
2022-03-13 14:31:43 +01:00
|
|
|
)
|
|
|
|
machine.succeed(
|
2023-10-26 11:01:09 +02:00
|
|
|
"curl -sS --fail http://localhost:8080/axis2/axis2-web/HappyAxis.jsp | grep 'Found Axis2'"
|
2022-03-13 14:31:43 +01:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
})
|