From 87a88dee55686ee70c2cf828b5913bb4994706cd Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Apr 12 2012 19:04:01 +0000 Subject: added test for curl --- diff --git a/tests/p_curl/0-install_curl.sh b/tests/p_curl/0-install_curl.sh new file mode 100755 index 0000000..f77ff47 --- /dev/null +++ b/tests/p_curl/0-install_curl.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Author: Athmane Madjoudj +# Christoph Galuschka + +t_Log "$0 - installing curl" +t_InstallPackage curl diff --git a/tests/p_curl/curl_test.sh b/tests/p_curl/curl_test.sh new file mode 100755 index 0000000..5f63001 --- /dev/null +++ b/tests/p_curl/curl_test.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# Author: Athmane Madjoudj +# Christoph Galuschka + +t_Log "Running $0 - curl can access http-host and retrieve index.html." + +CHECK_FOR="CentOS Wiki" +SKIP_QA_HARNESS=1 + +if [ $SKIP_QA_HARNESS ]; then + URL="http://wiki.centos.org/" +else + URL="http://repo.centos.qa/srv/CentOS/" +fi + +t_Log "Querying ${URL}" +curl -s ${URL} | grep -q "${CHECK_FOR}" +ret_val=$? +echo $ret_val +#t_CheckExitStatus $ret_val