at 23.11-beta 759 B view raw
1import ./make-test-python.nix ({ pkgs, ... }: { 2 name = "tomcat"; 3 4 nodes.machine = { pkgs, ... }: { 5 services.tomcat = { 6 enable = true; 7 axis2.enable = true; 8 }; 9 }; 10 11 testScript = '' 12 machine.wait_for_unit("tomcat.service") 13 machine.wait_for_open_port(8080) 14 machine.wait_for_file("/var/tomcat/webapps/examples"); 15 16 machine.succeed( 17 "curl -sS --fail http://localhost:8080/examples/servlets/servlet/HelloWorldExample | grep 'Hello World!'" 18 ) 19 machine.succeed( 20 "curl -sS --fail http://localhost:8080/examples/jsp/jsp2/simpletag/hello.jsp | grep 'Hello, world!'" 21 ) 22 machine.succeed( 23 "curl -sS --fail http://localhost:8080/axis2/axis2-web/HappyAxis.jsp | grep 'Found Axis2'" 24 ) 25 ''; 26})