From 900985480b4015c340b2471fb5887aa3486e09d2 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Apr 20 2012 08:27:38 +0000 Subject: Merge branch 'master' of ssh://nazar.karan.org/el5/t_functional --- diff --git a/tests/p_chkconfig/chkconfig_list_services.sh b/tests/p_chkconfig/chkconfig_list_services.sh new file mode 100755 index 0000000..895fdb8 --- /dev/null +++ b/tests/p_chkconfig/chkconfig_list_services.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Author: Athmane Madjoudj + +t_Log "Running $0 - check if chkconfig can list a service status" + +# auditd is used as example because it's standard with minimal install +chkconfig --list auditd | grep -q '3:on' + +t_CheckExitStatus $? + diff --git a/tests/p_dovecot/0-install_dovecot.sh b/tests/p_dovecot/0-install_dovecot.sh index f1b566b..d8dadcf 100755 --- a/tests/p_dovecot/0-install_dovecot.sh +++ b/tests/p_dovecot/0-install_dovecot.sh @@ -7,5 +7,4 @@ t_Log "Running $0 - installation and startup of dovecot IMAP/POP3." t_InstallPackage nc grep t_InstallPackage dovecot -chkconfig dovecot on t_ServiceControl dovecot start diff --git a/tests/p_freeradius/0-install_freeradius.sh b/tests/p_freeradius/0-install_freeradius.sh index 9723d84..2691b09 100755 --- a/tests/p_freeradius/0-install_freeradius.sh +++ b/tests/p_freeradius/0-install_freeradius.sh @@ -16,8 +16,6 @@ else t_InstallPackage freeradius2 fi -# activate at boot -chkconfig radiusd on # start daemon with default settings if (t_GetPkgRel basesystem | grep -q el6) then diff --git a/tests/p_httpd/0-install_httpd.sh b/tests/p_httpd/0-install_httpd.sh index 649444f..b5db22e 100755 --- a/tests/p_httpd/0-install_httpd.sh +++ b/tests/p_httpd/0-install_httpd.sh @@ -8,5 +8,4 @@ t_InstallPackage curl # HTTPD / PHP t_InstallPackage httpd mod_ssl php php-mysql -chkconfig httpd on t_ServiceControl httpd restart diff --git a/tests/p_initscripts/initscripts_centos_brand_rcsysinit b/tests/p_initscripts/initscripts_centos_brand_rcsysinit deleted file mode 100755 index 090a7b1..0000000 --- a/tests/p_initscripts/initscripts_centos_brand_rcsysinit +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# Author: Athmane Madjoudj - -t_Log "Running $0 - initscripts CentOS branding " - -if (t_GetPkgRel basesystem | grep -q el6) -then - t_Log "Test not required for CentOS 6.x" - exit 0 -else - grep "CentOS" /etc/rc.sysinit > /dev/null 2>&1 -fi - -t_CheckExitStatus $? diff --git a/tests/p_initscripts/initscripts_centos_brand_rcsysinit.sh b/tests/p_initscripts/initscripts_centos_brand_rcsysinit.sh new file mode 100755 index 0000000..090a7b1 --- /dev/null +++ b/tests/p_initscripts/initscripts_centos_brand_rcsysinit.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Author: Athmane Madjoudj + +t_Log "Running $0 - initscripts CentOS branding " + +if (t_GetPkgRel basesystem | grep -q el6) +then + t_Log "Test not required for CentOS 6.x" + exit 0 +else + grep "CentOS" /etc/rc.sysinit > /dev/null 2>&1 +fi + +t_CheckExitStatus $? diff --git a/tests/p_initscripts/initscripts_service_status.sh b/tests/p_initscripts/initscripts_service_status.sh new file mode 100755 index 0000000..2c7c382 --- /dev/null +++ b/tests/p_initscripts/initscripts_service_status.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Author: Athmane Madjoudj + +t_Log "Running $0 - check if service cmd can get service status" + +# auditd is used as example because it's standard with minimal install +service auditd status | grep -q 'is running' + +t_CheckExitStatus $? + diff --git a/tests/p_mysql/0-install_mysqld.sh b/tests/p_mysql/0-install_mysqld.sh index 6406ac7..8b06eae 100755 --- a/tests/p_mysql/0-install_mysqld.sh +++ b/tests/p_mysql/0-install_mysqld.sh @@ -3,5 +3,4 @@ # MySQL t_InstallPackage mysql-server -chkconfig mysqld on t_ServiceControl mysqld start >/dev/null 2>&1 diff --git a/tests/p_net-snmp/0-install_snmpd.sh b/tests/p_net-snmp/0-install_snmpd.sh index b1feb08..13af1ea 100755 --- a/tests/p_net-snmp/0-install_snmpd.sh +++ b/tests/p_net-snmp/0-install_snmpd.sh @@ -4,8 +4,6 @@ # Install net-snmp t_InstallPackage net-snmp -# activate at boot -chkconfig snmpd on # start daemon with default settings t_ServiceControl snmpd start diff --git a/tests/p_ntp/5-start-check.sh b/tests/p_ntp/5-start-check.sh index 48090cd..3237dc2 100755 --- a/tests/p_ntp/5-start-check.sh +++ b/tests/p_ntp/5-start-check.sh @@ -2,7 +2,6 @@ # Author: Steve Barnes (steve@echo.id.au) # Start NTPd services and confirm it's running. -chkconfig ntpd on t_ServiceControl ntpd start NTPD_PID=$(pidof ntpd) diff --git a/tests/p_openssh/0-install_sshd.sh b/tests/p_openssh/0-install_sshd.sh index c8a38e7..31079dd 100755 --- a/tests/p_openssh/0-install_sshd.sh +++ b/tests/p_openssh/0-install_sshd.sh @@ -3,5 +3,4 @@ # expect is needed by the test t_InstallPackage openssh-server openssh-clients expect -chkconfig sshd on t_ServiceControl sshd start diff --git a/tests/p_vsftpd/0-install_vsftpd.sh b/tests/p_vsftpd/0-install_vsftpd.sh index 5af700d..091973f 100755 --- a/tests/p_vsftpd/0-install_vsftpd.sh +++ b/tests/p_vsftpd/0-install_vsftpd.sh @@ -3,5 +3,4 @@ # vsFTPd t_InstallPackage vsftpd -chkconfig vsftpd on t_ServiceControl vsftpd start diff --git a/tests/r_lamp/0_lamp_install.sh b/tests/r_lamp/0_lamp_install.sh index fd78883..ca4b8b3 100755 --- a/tests/r_lamp/0_lamp_install.sh +++ b/tests/r_lamp/0_lamp_install.sh @@ -2,3 +2,4 @@ # Author: Steve Barnes (steve@echo.id.au) t_InstallPackage httpd mysql-server php +t_ServiceControl httpd restart diff --git a/tests/r_lamp/40_basic_lamp.sh b/tests/r_lamp/40_basic_lamp.sh index 15688f6..c3a2e49 100755 --- a/tests/r_lamp/40_basic_lamp.sh +++ b/tests/r_lamp/40_basic_lamp.sh @@ -48,6 +48,7 @@ content=`echo "select * from qatests.tests where name='mysqltest'"|mysql -B --sk # Clean up mysql -u root -e 'drop database qatests;' +service httpd stop if [ "$content" = "mysqltest" ] ; then t_Log PASS;