diff options
author | Anthony Roussel <anthony@roussel.dev> | 2023-10-26 11:01:09 +0200 |
---|---|---|
committer | Anthony Roussel <anthony@roussel.dev> | 2023-11-07 11:35:38 +0100 |
commit | 6b6bc55a6f943115acd0e69a4eb1bce08da39b3e (patch) | |
tree | 6812fcc72a53199fbb2ff0f1e9a4bedfa646dbcd /nixos/tests/tomcat.nix | |
parent | 789fe864db6ce585fa6ee811e5dae9b4438ddeaf (diff) |
nixosTests.tomcat: test Apache Axis2 container integration
Diffstat (limited to 'nixos/tests/tomcat.nix')
-rw-r--r-- | nixos/tests/tomcat.nix | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/nixos/tests/tomcat.nix b/nixos/tests/tomcat.nix index 4cfb3cc5a7d84..a5f219e104ad4 100644 --- a/nixos/tests/tomcat.nix +++ b/nixos/tests/tomcat.nix @@ -1,21 +1,26 @@ -import ./make-test-python.nix ({ pkgs, ... }: - -{ +import ./make-test-python.nix ({ pkgs, ... }: { name = "tomcat"; nodes.machine = { pkgs, ... }: { - services.tomcat.enable = true; + 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 --fail http://localhost:8080/examples/servlets/servlet/HelloWorldExample | grep 'Hello World!'" + "curl -sS --fail http://localhost:8080/examples/jsp/jsp2/simpletag/hello.jsp | grep 'Hello, world!'" ) machine.succeed( - "curl --fail http://localhost:8080/examples/jsp/jsp2/simpletag/hello.jsp | grep 'Hello, world!'" + "curl -sS --fail http://localhost:8080/axis2/axis2-web/HappyAxis.jsp | grep 'Found Axis2'" ) ''; }) |