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