From 883f7609eedeeffd865bafd11e4a9e19c1018496 Mon Sep 17 00:00:00 2001 From: Athmane Madjoudj Date: Dec 08 2011 09:26:29 +0000 Subject: Merge commit 'refs/merge-requests/3' of git://gitorious.org/testautomation/t_functional into merge-requests/3 --- diff --git a/tests/p_freeradius/radiusd_test.sh b/tests/p_freeradius/radiusd_test.sh index fd1487b..057933c 100755 --- a/tests/p_freeradius/radiusd_test.sh +++ b/tests/p_freeradius/radiusd_test.sh @@ -21,9 +21,9 @@ service radiusd restart #Run test - t_Log "Running Test" - echo "User-Name=steve,Password=centos " | radclient -x localhost:1812 auth testing123 |grep -qc 'Access-Accept' - ret_val=$? +t_Log "Running Test" +echo "User-Name=steve,Password=centos " | radclient -x localhost:1812 auth testing123 |grep -qc 'Access-Accept' +ret_val=$? # Restore settings /bin/cp /etc/raddb/users.orig /etc/raddb/users diff --git a/tests/p_php/01_prep.sh b/tests/p_php/01_prep.sh deleted file mode 100755 index d8b2af9..0000000 --- a/tests/p_php/01_prep.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -t_Log "Running $0 - attempting to install php-cli." -t_InstallPackage php-cli - diff --git a/tests/p_php/0_install_php-cli.sh b/tests/p_php/0_install_php-cli.sh new file mode 100755 index 0000000..24a93ff --- /dev/null +++ b/tests/p_php/0_install_php-cli.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# Author: Christoph Galuschka + +t_Log "Running $0 - attempting to install php-cli." +t_InstallPackage php-cli + diff --git a/tests/p_php/20-php-mysql-test.sh b/tests/p_php/20-php-mysql-test.sh index 9f6510f..55d5c11 100755 --- a/tests/p_php/20-php-mysql-test.sh +++ b/tests/p_php/20-php-mysql-test.sh @@ -16,6 +16,7 @@ t_ServiceControl mysqld start >/dev/null 2>&1 CREATE='/var/tmp/mysql-php-QA.sql' cat >$CREATE < + +t_Log "Running $0 - installing rsync and xinetd." +t_InstallPackage xinetd rsync + +# enable rsync in /etc/xinet.d/rsync +sed -i 's/\(disable\s*=\ \)yes/\1no/' /etc/xinetd.d/rsync + +# Restart in case previous tests allready installed xinetd +t_ServiceControl xinetd restart diff --git a/tests/p_rsync/10-rsync-test.sh b/tests/p_rsync/10-rsync-test.sh new file mode 100755 index 0000000..9da8039 --- /dev/null +++ b/tests/p_rsync/10-rsync-test.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# Author: Athmane Madjoudj +# Author: Christoph Galuschka + +t_Log "Running $0 - rsyncd can rsync from/to local machine." + +# create settings to run test + +PATH2FILE='/var/tmp' +FILE='rsync-test' +cat > $PATH2FILE/$FILE < /etc/rsyncd.conf < +# Christoph Galuschka + +t_Log "$0 - installing wget" +t_InstallPackage wget diff --git a/tests/p_wget/wget_test.sh b/tests/p_wget/wget_test.sh new file mode 100755 index 0000000..4edc011 --- /dev/null +++ b/tests/p_wget/wget_test.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# Author: Athmane Madjoudj +# Christoph Galuschka + +t_Log "Running $0 - wget can access http-host and download index.html." +SKIP_QA_HARNESS=1 +FILE=/var/tmp/index.html + +if [ $SKIP_QA_HARNESS ]; then + HOST=wiki.centos.org + CHECK_FOR="FrontPage - CentOS Wiki" +else + HOST=repo.centos.qa + # athmane: could you please insert something here that is returned from qa-host + CHECK_FOR="ks_cfg" +fi + +t_Log "Querying http://${HOST}" +wget -q --output-document=${FILE} http://${HOST}/ +grep -q "${CHECK_FOR}" ${FILE} +ret_val=$? + +/bin/rm ${FILE} +t_CheckExitStatus $ret_val