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>
a09abc
# 	  Christoph Galuschka <tigalch@tigalch.org>
root 6daf8d
root 6daf8d
t_Log "Running $0 - lftp: HTTP test"
Christoph Galuschka 917e7a
Karanbir Singh 23b6ba
if [ $SKIP_QA_HARNESS -eq 1 ]; then
Christoph Galuschka 89571c
  URL="http://mirror.centos.org/"
root 6daf8d
else
a09abc
  URL="http://repo.centos.qa/srv/CentOS/"
root 6daf8d
fi
root 6daf8d
a09abc
CHECK_FOR="UTC"
a09abc
FILE="timestamp.txt"
a09abc
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}