Skip to content
Snippets Groups Projects
Commit a0b22fdc authored by Alex Iribarren's avatar Alex Iribarren
Browse files

Patched tests already upstream

parent 67c173ac
Branches
No related tags found
No related merge requests found
Pipeline #1978578 passed
......@@ -95,7 +95,7 @@ patch -p0 --ignore-whitespace <<'DELIM'
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,23 +5,23 @@
@@ -5,7 +5,7 @@
# Testing availability of network
if [ $SKIP_QA_HARNESS -eq 1 ]; then
......@@ -104,28 +104,9 @@ patch -p0 --ignore-whitespace <<'DELIM'
else
HOST="repo.centos.qa"
fi
t_Log "Running $0 - running ${TEST} to ${HOST}"
-IP=$(host ${HOST})
+IP=$(dig +short ${HOST} A ${HOST} AAAA)
FILE=/var/tmp/tracepath_result
ret_val=1
# getting IP-address of default gateway as a fall back
defgw=$(ip route list | grep default | cut -d' ' -f3)
-if [[ $IP =~ .*address\ ([0-9.]*) ]]
+if [[ ! -z "$IP" ]]
then
tracepath -n ${HOST} > ${FILE}
- COUNT=$(grep -c ${BASH_REMATCH[1]} ${FILE})
+ COUNT=$(echo "$IP" | grep -cf - ${FILE})
TTL=$(grep -c 'Too many hops' ${FILE})
GW=$(grep -c ${defgw} ${FILE})
if ([ $COUNT = 1 ] || [ $COUNT = 2 ])
--- 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,20 +5,21 @@
@@ -5,7 +5,7 @@
# Testing availability of network
if [ $SKIP_QA_HARNESS -eq 1 ]; then
......@@ -134,35 +115,9 @@ patch -p0 --ignore-whitespace <<'DELIM'
else
HOST="repo.centos.qa"
fi
t_Log "Running $0 - running ${TEST} to ${HOST}"
ret_val=1
+FILE=/var/tmp/mtr_result
-IP=$(host ${HOST})
+IP=$(dig +short ${HOST} A ${HOST} AAAA)
-regex='.*address\ ([0-9.]*)'
-if [[ $IP =~ $regex ]]
+if [[ ! -z "$IP" ]]
then
- COUNT=$( mtr -nr -c1 ${HOST} | grep -c ${BASH_REMATCH[1]} )
+ mtr -nr -c1 ${HOST} > ${FILE}
+ COUNT=$(echo "$IP" | grep -cf - ${FILE})
if [ $COUNT = 1 ]
then
t_Log "${TEST} reached ${HOST}"
@@ -27,6 +28,7 @@
t_Log "${TEST} didn't reach ${HOST}"
ret_val=1
fi
+ /bin/rm ${FILE}
fi
t_CheckExitStatus $ret_val
--- 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,23 +5,23 @@
@@ -5,7 +5,7 @@
# Testing availability of network
if [ $SKIP_QA_HARNESS -eq 1 ]; then
......@@ -171,25 +126,6 @@ patch -p0 --ignore-whitespace <<'DELIM'
else
HOST="repo.centos.qa"
fi
t_Log "Running $0 - running ${TEST} to ${HOST}"
-IP=$(host ${HOST})
+IP=$(dig +short ${HOST} A ${HOST} AAAA)
FILE=/var/tmp/traceroute_result
ret_val=1
# getting IP-address of default gateway as a fall back
defgw=$(ip route list | grep default | cut -d' ' -f3)
-if [[ $IP =~ .*address\ ([0-9.]*) ]]
+if [[ ! -z "$IP" ]]
then
traceroute -n ${HOST} > ${FILE}
- COUNT=$(grep -c ${BASH_REMATCH[1]} ${FILE})
+ COUNT=$(echo "$IP" | grep -cf - ${FILE})
TTL=$(egrep -c '30 \* \* \*' ${FILE})
GW=$(grep -c ${defgw} ${FILE})
if [ $COUNT = 2 ]
--- 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 @@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment