bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

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
Christoph Galuschka 87a88d
if [ $SKIP_QA_HARNESS ]; then
b3e6ea
  CHECK_FOR="CentOS Wiki"
Christoph Galuschka 87a88d
  URL="http://wiki.centos.org/"
Christoph Galuschka 87a88d
else
b3e6ea
  CHECK_FOR="Index of /srv"
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 c4dcfe
Christoph Galuschka c4dcfe
t_CheckExitStatus $?