From cf775d82e622374d9619566920c01a67121d2d02 Mon Sep 17 00:00:00 2001 From: Athmane Madjoudj Date: Sep 23 2012 15:35:42 +0000 Subject: Merge branch 'master' of gitorious.org:testautomation/t_functional --- diff --git a/tests/0_common/50_set_OS-version.sh b/tests/0_common/50_set_OS-version.sh deleted file mode 100755 index 1c8452d..0000000 --- a/tests/0_common/50_set_OS-version.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -# Author: Christoph Galuschka - -t_Log "Running $0 - Setting OS version to 5 or 6" - -centos_ver=$(t_DistCheck) diff --git a/tests/p_lftp/20_lftp_ftp.sh b/tests/p_lftp/20_lftp_ftp.sh index eedce86..7df9f02 100755 --- a/tests/p_lftp/20_lftp_ftp.sh +++ b/tests/p_lftp/20_lftp_ftp.sh @@ -3,24 +3,39 @@ # Author: Munish Kumar # Author: Ayush Gupta # Author: Konark Modi -FILE=/tmp/test_lftp_ftp.txt +# Christoph Galuschka -if [ $SKIP_QA_HARNESS ]; then -URL="ftp://ftp.freebsd.org/pub/FreeBSD/" -else -URL="ftp://ftp.freebsd.org/pub/FreeBSD/" -fi +t_Log "Running $0 - installing vsFTPd for local lftp test." +t_InstallPackage vsftpd +t_ServiceControl vsftpd restart + +# Destination File +TESTFILE=/tmp/t_functional-lftp-test.txt + +# Source File on FTP server +SOURCE=/var/ftp/ +FILE=lftp-test.txt +cat > $SOURCE$FILE << EOF +t_functional +EOF +URL="ftp://127.0.0.1/" +t_Log "Running $0 - lftp test with local FTP server." -lftp -e 'set net:timeout 10; get README.TXT -o $FILE; bye' $URL > /dev/null 2>&1 -t_Log "Running $0 - lftp test with FTP test." -if [ -f $FILE ] +lftp -e 'set net:timeout 10; get '${FILE}' -o '$TESTFILE' ; bye' $URL > /dev/null 2>&1 +if [ -f $TESTFILE ] then - grep -ci 'konark' $FILE + grep -q 't_functional' $TESTFILE ret_val=$? else t_Log "FTP test for lftp failed" ret_val=$? fi -rm -f $FILE + +# clean up +rm -f $TESTFILE +rm -f $SOURCE$FILE +t_ServiceControl vsftpd stop +t_RemovePackage vsftpd + t_CheckExitStatus $ret_val