From 4013006ccd3efe61df8af398a6ab3377c8e3b737 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Mar 13 2015 12:21:34 +0000 Subject: Added an extra check for the abrt-cli test and skip if Mantis testing instance isn't reachable --- diff --git a/tests/p_abrt-cli/10-abrt-cli-reporting-test.sh b/tests/p_abrt-cli/10-abrt-cli-reporting-test.sh index d7e9be4..8abeaa4 100755 --- a/tests/p_abrt-cli/10-abrt-cli-reporting-test.sh +++ b/tests/p_abrt-cli/10-abrt-cli-reporting-test.sh @@ -5,10 +5,18 @@ TEST_DIR="tests/p_abrt-cli" source $TEST_DIR/_lib.sh source $TEST_DIR/_CentOSBugTracker.conf +t_Log "Running $0 - test reporting to CentOS Bug Tracker" + +# testing if bugs-test.centos.org is reachable for that test .. +curl --silent -I http://bugs-test.centos.org/my_view_page.php|grep -q "HTTP/1.1 200 OK" +if [ "$?" -ne "0" ];then + t_Log "Mantis test instance doesn't seem reachable ... SKIP" + exit 0 +fi + # run only on centos 7 or greater [[ $centos_ver -lt 7 ]] && exit 0 -t_Log "Running $0 - test reporting to CentOS Bug Tracker" conf_file="/etc/libreport/events/report_CentOSBugTracker.conf" abrt_action_conf_file="/etc/abrt/abrt-action-save-package-data.conf" diff --git a/tests/p_abrt-cli/5-abrt-cli-test.sh b/tests/p_abrt-cli/5-abrt-cli-test.sh index 5c27866..b593dbf 100755 --- a/tests/p_abrt-cli/5-abrt-cli-test.sh +++ b/tests/p_abrt-cli/5-abrt-cli-test.sh @@ -24,10 +24,18 @@ TEST_DIR="tests/p_abrt-cli" source $TEST_DIR/_lib.sh +t_Log "Running $0 - reporter-mantisbt test suite" + +# testing if bugs-test.centos.org is reachable for that test .. +curl --silent -I http://bugs-test.centos.org/my_view_page.php|grep -q "HTTP/1.1 200 OK" +if [ "$?" -ne "0" ];then + t_Log "Mantis test instance doesn't seem reachable ... SKIP" + exit 0 +fi + # run only on centos 7 or greater [[ $centos_ver -lt 7 ]] && exit -t_Log "Running $0 - reporter-mantisbt test suite" rlJournalStart rlPhaseStartSetup