Blame tests/p_lftp/10_lftp_http_test.sh
|
root |
6daf8d |
#!/bin/sh
|
|
root |
6daf8d |
# Author: Piyush Kumar <piykumar@gmail.com>
|
|
root |
6daf8d |
# Author: Munish Kumar <munishktotech@gmail.com>
|
|
root |
6daf8d |
# Author: Ayush Gupta <ayush.001@gmail.com>
|
|
root |
6daf8d |
# Author: Konark Modi <modi.konark@gmail.com>
|
|
Christoph Galuschka |
89571c |
# Christoph Galuschka <christoph.galuschka@chello.at>
|
|
root |
6daf8d |
|
|
root |
6daf8d |
t_Log "Running $0 - lftp: HTTP test"
|
|
root |
6daf8d |
if [ $SKIP_QA_HARNESS ]; then
|
|
Christoph Galuschka |
89571c |
CHECK_FOR="UTC"
|
|
Christoph Galuschka |
89571c |
URL="http://mirror.centos.org/"
|
|
Christoph Galuschka |
89571c |
FILE="timestamp.txt"
|
|
root |
6daf8d |
else
|
|
Christoph Galuschka |
89571c |
CHECK_FOR="CentOS"
|
|
Christoph Galuschka |
89571c |
URL="http://repo.centos.qa/CentOS/6/os/x86_64/"
|
|
Christoph Galuschka |
89571c |
FILE="RELEASE-NOTES-en-US.html"
|
|
root |
6daf8d |
fi
|
|
root |
6daf8d |
|
|
Christoph Galuschka |
89571c |
t_Log "Querying ${URL}${FILE}"
|
|
root |
6daf8d |
|
|
Christoph Galuschka |
89571c |
lftp <
|
|
Christoph Galuschka |
89571c |
pget -n 5 ${URL}${FILE}
|
|
root |
6daf8d |
bye
|
|
root |
6daf8d |
EOF
|
|
root |
6daf8d |
|
|
Christoph Galuschka |
89571c |
grep -q "${CHECK_FOR}" ${FILE}
|
|
Christoph Galuschka |
89571c |
t_CheckExitStatus $?
|
|
Christoph Galuschka |
89571c |
|
|
Christoph Galuschka |
89571c |
/bin/rm ${FILE}
|