Skip to content

Commit 077e824

Browse files
committed
test: Fix non-POSIX equal operator use
1 parent ded0e90 commit 077e824

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/MODCLUSTER-785/testit.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ while true
6666
do
6767
sleep 1
6868
http_code=$(curl -s -m 20 -o /dev/null -w "%{http_code}" http://localhost:8090/app/status.jsp)
69-
if [ ${http_code} == 200 ]; then
69+
if [ ${http_code} = 200 ]; then
7070
break
7171
fi
7272
i=$(expr $i + 1)
@@ -75,7 +75,7 @@ do
7575
fi
7676
echo "*${http_code}*"
7777
done
78-
if [ ${http_code} == 503 ]; then
78+
if [ ${http_code} = 503 ]; then
7979
echo "MODCLUSTER-785 Failed! return 503"
8080
exit 1
8181
fi
@@ -90,7 +90,7 @@ while true
9090
do
9191
sleep 1
9292
http_code=$(curl -s -m 20 -o /dev/null -w "%{http_code}" http://localhost:8090/app/status.jsp)
93-
if [ ${http_code} == 503 ]; then
93+
if [ ${http_code} = 503 ]; then
9494
echo "MODCLUSTER-785 Failed! return 503"
9595
exit 1
9696
fi

test/maintests.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ sleep 12
3030
# Sticky (yes, there is only one app!!!)
3131
echotestlabel "sticky one app"
3232
SESSIONCO=$(curl -v http://localhost:8090/testapp/test.jsp -m 20 -o /dev/null 2>&1 | grep Set-Cookie | awk '{ print $3 } ' | sed 's:;::')
33-
if [ "${SESSIONCO}" == "" ];then
33+
if [ "${SESSIONCO}" = "" ];then
3434
echo "Failed no sessionid in curl output..."
3535
curl -v http://localhost:8090/testapp/test.jsp
3636
fi
@@ -55,7 +55,7 @@ NEWNODE=$(echo ${NEWCO} | awk -F = '{ print $2 }' | awk -F . '{ print $2 }')
5555
echo "second: ${NEWCO} node: ${NEWNODE}"
5656
echo "Checking we can reach the 2 nodes"
5757
i=0
58-
while [ "${NODE}" == "${NEWNODE}" ]
58+
while [ "${NODE}" = "${NEWNODE}" ]
5959
do
6060
NEWCO=$(curl -v http://localhost:8090/testapp/test.jsp -m 20 -o /dev/null 2>&1 | grep Set-Cookie | awk '{ print $3 } ' | sed 's:;::')
6161
NEWNODE=$(echo ${NEWCO} | awk -F = '{ print $2 }' | awk -F . '{ print $2 }')
@@ -64,7 +64,7 @@ do
6464
echo "Can't find the 2 webapps"
6565
exit 1
6666
fi
67-
if [ "${NEWNODE}" == "" ]; then
67+
if [ "${NEWNODE}" = "" ]; then
6868
echo "Can't find node in request"
6969
exit 1
7070
fi
@@ -92,7 +92,7 @@ PORT=$(curl http://localhost:8090/mod_cluster_manager -m 20 | grep Node | grep $
9292
NUMBER=$(expr ${PORT} - 8080 + 1)
9393
CODE="200"
9494
i=0
95-
while [ "$CODE" == "200" ]
95+
while [ "$CODE" = "200" ]
9696
do
9797
if [ $i -gt 100 ]; then
9898
echo "Done remaining tomcat still answering!"

0 commit comments

Comments
 (0)