From ebf159e7b3bef0da38de97a7d1e23ad3bc82328e Mon Sep 17 00:00:00 2001 From: Athmane Madjoudj Date: Jun 15 2011 22:40:01 +0000 Subject: Added two tomcat5 tests (basic test and manager test) --- diff --git a/tests/p_tomcat5/0-install_tomcat5.sh b/tests/p_tomcat5/0-install_tomcat5.sh new file mode 100755 index 0000000..a8f7301 --- /dev/null +++ b/tests/p_tomcat5/0-install_tomcat5.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Author: Athmane Madjoudj + +t_Log "$0 - installing Tomcat 5" +t_InstallPackage tomcat5 tomcat5-admin-webapps tomcat5-webapps +service tomcat5 start diff --git a/tests/p_tomcat5/1-config_tomcat5.sh b/tests/p_tomcat5/1-config_tomcat5.sh new file mode 100755 index 0000000..be2ca5c --- /dev/null +++ b/tests/p_tomcat5/1-config_tomcat5.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Author: Athmane Madjoudj + +t_Log "$0 - Configuring Tomcat 5" + +sed -i 's/<\/tomcat-users>/\n<\/tomcat-users>/' /etc/tomcat5/tomcat-users.xml + + +service tomcat5 restart diff --git a/tests/p_tomcat5/README b/tests/p_tomcat5/README new file mode 100644 index 0000000..ccee81b --- /dev/null +++ b/tests/p_tomcat5/README @@ -0,0 +1 @@ +This test is for CentOS 5.x only, CentOS 6.x will include Tomcat 6 (tomcat6 package) instead. diff --git a/tests/p_tomcat5/tomcat5_manager_test.sh b/tests/p_tomcat5/tomcat5_manager_test.sh new file mode 100755 index 0000000..da6430e --- /dev/null +++ b/tests/p_tomcat5/tomcat5_manager_test.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# Author: Athmane Madjoudj + +t_Log "Running $0 - Tomcat 5 Web Application Manager test." + +curl -u admin:admin -s http://localhost:8080/manager/html | grep "Tomcat Web Application Manager" >/dev/null 2>&1 + +t_CheckExitStatus $? diff --git a/tests/p_tomcat5/tomcat5_test.sh b/tests/p_tomcat5/tomcat5_test.sh new file mode 100755 index 0000000..24df696 --- /dev/null +++ b/tests/p_tomcat5/tomcat5_test.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# Author: Athmane Madjoudj + +t_Log "Running $0 - Tomcat 5 basic test." + +curl -s http://localhost:8080/ | grep "you've setup Tomcat successfully. Congratulations!" >/dev/null 2>&1 + +t_CheckExitStatus $?