Blame tests/p_curl/curl_test.sh

Christoph Galuschka 87a88d
#!/bin/sh
Christoph Galuschka 87a88d
# Author: Athmane Madjoudj <athmanem@gmail.com>
Christoph Galuschka 87a88d
# Christoph Galuschka <christoph.galuschka@chello.at>
Christoph Galuschka 87a88d
Christoph Galuschka 87a88d
t_Log "Running $0 - curl can access http-host and retrieve index.html."
Christoph Galuschka 87a88d
Christoph Galuschka 87a88d
CHECK_FOR="CentOS Wiki"
Christoph Galuschka 87a88d
SKIP_QA_HARNESS=1
Christoph Galuschka 87a88d
Christoph Galuschka 87a88d
if [ $SKIP_QA_HARNESS ]; then
Christoph Galuschka 87a88d
  URL="http://wiki.centos.org/"
Christoph Galuschka 87a88d
else
Christoph Galuschka 87a88d
  URL="http://repo.centos.qa/srv/CentOS/"
Christoph Galuschka 87a88d
fi
Christoph Galuschka 87a88d
Christoph Galuschka 87a88d
t_Log "Querying ${URL}"
Christoph Galuschka 87a88d
curl -s ${URL} | grep -q "${CHECK_FOR}"
Christoph Galuschka 87a88d
ret_val=$?
Christoph Galuschka 87a88d
echo $ret_val
Christoph Galuschka 87a88d
#t_CheckExitStatus $ret_val