From 34da5e00d08bf5718731d5a89bcade0e8e4e196c Mon Sep 17 00:00:00 2001 From: Karanbir Singh Date: Nov 17 2011 11:06:00 +0000 Subject: generalise skipping qa harness; adapt network tests to use a suiteable target host --- diff --git a/doc/RunningTests b/doc/RunningTests index 369d40d..a9b145a 100644 --- a/doc/RunningTests +++ b/doc/RunningTests @@ -1,2 +1,2 @@ -To run these tests on your local machine, set SKIP_QA_REPOS=1 in the bash environment before calling runtests.sh. eg: -SKIP_QA_REPOS=1 ./runtests.sh +To run these tests on your local machine, set SKIP_QA_HARNESS=1 in the bash environment before calling runtests.sh. eg: +SKIP_QA_HARNESS=1 ./runtests.sh diff --git a/tests/0_common/00_qa_repo_config.sh b/tests/0_common/00_qa_repo_config.sh index 3122697..af9f67d 100755 --- a/tests/0_common/00_qa_repo_config.sh +++ b/tests/0_common/00_qa_repo_config.sh @@ -1,7 +1,7 @@ #!/bin/bash t_Log "Running $0 - modifying yum repositories for QA purposes." -if [ $SKIP_QA_REPOS ]; then +if [ $SKIP_QA_HARNESS ]; then echo 'Skip..' exit 0 fi diff --git a/tests/0_common/30_dns_works.sh b/tests/0_common/30_dns_works.sh index a52b79a..1c40650 100755 --- a/tests/0_common/30_dns_works.sh +++ b/tests/0_common/30_dns_works.sh @@ -1,9 +1,14 @@ #!/bin/bash t_Log "Running $0 - testing to see if DNS works" +if [ $SKIP_QA_HARNESS ]; then + HOST=wiki.centos.org +else + HOST=repo.centos.qa +fi # its important we dont hit a dns record with a wildcard like centos.org -/bin/ping -c 1 repo.centos.qa &>/dev/null +/bin/ping -c 1 $HOST &>/dev/null t_CheckExitStatus $? diff --git a/tests/p_squid/squid_test.sh b/tests/p_squid/squid_test.sh index 529b939..0e6c2c1 100755 --- a/tests/p_squid/squid_test.sh +++ b/tests/p_squid/squid_test.sh @@ -3,6 +3,14 @@ t_Log "Running $0 - Squid test." -squidclient -T 2 http://repo.centos.qa/qa/ | grep "ks_cfg" >/dev/null 2>&1 +if [ $SKIP_QA_HARNESS ]; then + HOST=wiki.centos.org + CHECK_FOR="Page templates" +else + HOST=qa.centos.repo + CHECK_FOR="ks_cfg" +fi + +squidclient -T 2 http://${HOST}/qa/ | grep "${CHECK_FOR}" >/dev/null 2>&1 t_CheckExitStatus $?