Verified Commit 51e87a65 authored by Alex Iribarren's avatar Alex Iribarren
Browse files

Don't use external resources

parent 48561e68
Pipeline #2825757 passed with stages
in 12 minutes and 9 seconds
#!/bin/bash #!/bin/bash
# The following script runs Upstream CentOS functional tests with some tweaks for containerized context # The following script runs Upstream CentOS functional tests with some tweaks for containerized context
yum install git jq -y yum install git jq patch -y
# Find the last commit that passed upstream's Jenkins # Find the last commit that passed upstream's Jenkins
PASSING=$(curl -s https://ci.centos.org/job/CentOS-Core-QA-t_functional-c7-64/lastSuccessfulBuild/api/json | jq -r '.actions[] | select(.lastBuiltRevision) | .lastBuiltRevision.SHA1') PASSING=$(curl -s https://ci.centos.org/job/CentOS-Core-QA-t_functional-c7-64/lastSuccessfulBuild/api/json | jq -r '.actions[] | select(.lastBuiltRevision) | .lastBuiltRevision.SHA1')
...@@ -74,4 +74,100 @@ cat > ./skipped-tests.list <<DELIM ...@@ -74,4 +74,100 @@ cat > ./skipped-tests.list <<DELIM
7|tests/z_rpminfo/*|Does not apply in our case 7|tests/z_rpminfo/*|Does not apply in our case
DELIM DELIM
# Don't try to read external resources, we may not have network connection
patch -p0 --ignore-whitespace <<'DELIM'
--- tests/p_curl/curl_test.sh 2020-07-21 19:33:04.136367594 +0200
+++ tests/p_curl/curl_test.sh 2020-07-21 19:34:24.078892598 +0200
@@ -6,8 +6,8 @@
if [ $SKIP_QA_HARNESS -eq 1 ]; then
- CHECK_FOR="The CentOS Project"
- URL="http://www.centos.org/"
+ CHECK_FOR="CERN"
+ URL="http://linux.cern.ch/"
else
CHECK_FOR="Index of /srv"
URL="http://repo.centos.qa/srv/CentOS/"
--- tests/p_lftp/10_lftp_http_test.sh 2020-07-22 08:55:14.957707052 +0200
+++ tests/p_lftp/10_lftp_http_test.sh 2020-07-22 09:09:14.280135858 +0200
@@ -8,7 +8,7 @@
t_Log "Running $0 - lftp: HTTP test"
if [ $SKIP_QA_HARNESS -eq 1 ]; then
- URL="http://mirror.centos.org/"
+ URL="http://linuxsoft.cern.ch/centos/"
else
URL="http://repo.centos.qa/srv/CentOS/"
fi
--- tests/p_iputils/tracepath_test.sh 2020-07-22 09:16:07.230933005 +0200
+++ tests/p_iputils/tracepath_test.sh 2020-07-22 09:17:54.567397062 +0200
@@ -5,7 +5,7 @@
# Testing availability of network
if [ $SKIP_QA_HARNESS -eq 1 ]; then
- HOST="ci.centos.org"
+ HOST="linuxsoft.cern.ch"
else
HOST="repo.centos.qa"
fi
--- tests/p_mtr/mtr_test.sh 2020-07-22 10:07:09.370957352 +0200
+++ tests/p_mtr/mtr_test.sh 2020-07-22 10:11:26.710029174 +0200
@@ -5,7 +5,7 @@
# Testing availability of network
if [ $SKIP_QA_HARNESS -eq 1 ]; then
- HOST="ci.centos.org"
+ HOST="linuxsoft.cern.ch"
else
HOST="repo.centos.qa"
fi
@@ -18,7 +18,10 @@
if [[ ! -z "$IP" ]]
then
+ t_Log "${HOST} IPs:\n${IP}"
mtr -nr -c1 ${HOST} > ${FILE}
+ t_Log "Results of 'mtr -nr -c1 ${HOST}':"
+ cat ${FILE}
COUNT=$(echo "$IP" | grep -cf - ${FILE})
if [ $COUNT = 1 ]
then
--- tests/p_traceroute/traceroute_test.sh 2020-07-22 10:36:20.590306298 +0200
+++ tests/p_traceroute/traceroute_test.sh 2020-07-22 10:44:39.470382735 +0200
@@ -5,7 +5,7 @@
# Testing availability of network
if [ $SKIP_QA_HARNESS -eq 1 ]; then
- HOST="ci.centos.org"
+ HOST="linuxsoft.cern.ch"
else
HOST="repo.centos.qa"
fi
--- tests/p_wget/wget_test.sh 2020-07-22 10:39:37.275125990 +0200
+++ tests/p_wget/wget_test.sh 2020-07-22 10:41:31.094599707 +0200
@@ -8,7 +8,7 @@
if [ $SKIP_QA_HARNESS -eq 1 ]; then
CHECK_FOR="timestamp"
- URL="http://mirror.centos.org/"
+ URL="http://linuxsoft.cern.ch/centos/"
else
CHECK_FOR="CentOS"
URL="http://repo.centos.qa/srv/CentOS/"
--- tests/p_lynx/lynx_dump_page_test.sh 2020-07-22 10:56:33.509382238 +0200
+++ tests/p_lynx/lynx_dump_page_test.sh 2020-07-22 10:56:54.996472595 +0200
@@ -10,7 +10,7 @@
if [ "$SKIP_QA_HARNESS" = "1" ] ; then
- URL="http://mirror.centos.org/"
+ URL="http://linuxsoft.cern.ch/centos/"
CHECK_FOR="timestamp"
else
URL="http://repo.centos.qa/qa/"
DELIM
# Exit if we couldn't patch the tests
[[ $? -eq 0 ]] || exit 1
./runtests.sh ./runtests.sh
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment