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