| #!/bin/sh |
| |
| |
| |
| |
| |
| |
| t_Log "Running $0 - installing vsFTPd for local lftp test." |
| t_InstallPackage vsftpd |
| t_ServiceControl vsftpd restart |
| |
| |
| TESTFILE=/tmp/t_functional-lftp-test.txt |
| |
| |
| 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 '${FILE}' -o '$TESTFILE' ; bye' $URL > /dev/null 2>&1 |
| if [ -f $TESTFILE ] |
| then |
| grep -q 't_functional' $TESTFILE |
| ret_val=$? |
| else |
| t_Log "FTP test for lftp failed" |
| ret_val=$? |
| fi |
| |
| |
| rm -f $TESTFILE |
| rm -f $SOURCE$FILE |
| t_ServiceControl vsftpd stop |
| |
| t_CheckExitStatus $ret_val |