From 724d58fcad83df97dbc9e904248464a681eb5c09 Mon Sep 17 00:00:00 2001 From: Steve Barnes Date: May 26 2011 14:39:17 +0000 Subject: Applied patch from Athmane Madjoudj to fix httpd_vhosts test + adds 2 new tests - Squirrelmail and MySQL GRANT. --- diff --git a/tests/p_httpd/httpd_vhost.sh b/tests/p_httpd/httpd_vhost.sh index 77e01fe..16ee048 100755 --- a/tests/p_httpd/httpd_vhost.sh +++ b/tests/p_httpd/httpd_vhost.sh @@ -25,3 +25,4 @@ t_CheckExitStatus $? # that assume DocumentRoot is /var/www/html from failing rm /etc/httpd/conf.d/vhost-test.conf t_ServiceControl httpd reload + diff --git a/tests/p_mysql/mysqld_grant_test.sh b/tests/p_mysql/mysqld_grant_test.sh new file mode 100644 index 0000000..53e8701 --- /dev/null +++ b/tests/p_mysql/mysqld_grant_test.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# Author: Athmane Madjoudj + +t_Log "Running $0 - MySQL GRANT privileges test" + +mysql -u root -e 'create database mysql_test;' > /dev/null 2>&1 +mysql -u root -e "grant all on mysql_test.* to mysql_test@localhost identified by 'mysqltest'" > /dev/null 2>&1 +mysql -u root -e "flush privileges;" > /dev/null 2>&1 +mysql -u mysql_test -pmysqltest mysql_test -e 'create table test_table(id int);' > /dev/null 2>&1 + +t_CheckExitStatus $? diff --git a/tests/p_squirrelmail/0-install_squirrelmail.sh b/tests/p_squirrelmail/0-install_squirrelmail.sh new file mode 100644 index 0000000..078159e --- /dev/null +++ b/tests/p_squirrelmail/0-install_squirrelmail.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Author: Athmane Madjoudj + +# NOTE: squirrelmail rpm has require: httpd php php-mbstring +t_InstallPackage squirrelmail +t_ServiceControl httpd reload diff --git a/tests/p_squirrelmail/squirrelmail_test.sh b/tests/p_squirrelmail/squirrelmail_test.sh new file mode 100644 index 0000000..7626d7c --- /dev/null +++ b/tests/p_squirrelmail/squirrelmail_test.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# Author: Athmane Madjoudj + +t_Log "Running $0 - test SquirrelMail URL." +echo -e "GET /webmail/src/login.php HTTP/1.0\r\n" | nc localhost 80 | grep 'SquirrelMail' > /dev/null 2>&1 +t_CheckExitStatus $?