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..1ed1d1c --- /dev/null +++ b/tests/p_curl/curl_test.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# Author: Athmane Madjoudj +# Christoph Galuschka + +t_Log "Running $0 - curl can access http-host and retrieve index.html." + +CHECK_FOR="CentOS Wiki" + +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}" + +t_CheckExitStatus $?