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
Karanbir Singh 23b6ba
if [ $SKIP_QA_HARNESS -eq 1 ]; then
Athmane Madjoudj efcaf0
  CHECK_FOR="The CentOS Project"
Athmane Madjoudj efcaf0
  URL="http://www.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}"
ad9142
curl --location -s ${URL} | grep -q "${CHECK_FOR}"
Christoph Galuschka c4dcfe
Christoph Galuschka c4dcfe
t_CheckExitStatus $?