Skip to content

Commit

Permalink
Merge pull request loxilb-io#886 from TrekkieCoder/main
Browse files Browse the repository at this point in the history
loxilb-io#864 more test-cases in cicd scripts
  • Loading branch information
UltraInstinct14 authored Nov 24, 2024
2 parents 879c512 + 58722ca commit 35b5e0e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cicd/tcplb-src/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ config_docker_host --host1 llb1 --host2 l3ep1 --ptype phy --addr 31.31.31.254/24
config_docker_host --host1 llb1 --host2 l3ep2 --ptype phy --addr 32.32.32.254/24
config_docker_host --host1 llb1 --host2 l3ep3 --ptype phy --addr 33.33.33.254/24

$dexec llb1 ip addr add 10.10.10.3/32 dev lo
$hexec llb1 ip addr add 10.10.10.3/32 dev lo
$hexec l3h1 ip addr add 10.10.10.2/32 dev el3h1llb1

sleep 5
create_lb_rule llb1 20.20.20.1 --tcp=2020:8080 --endpoints=31.31.31.1:1,32.32.32.1:1,33.33.33.1:1 --sources=10.10.10.1/32
Expand Down
16 changes: 15 additions & 1 deletion cicd/tcplb-src/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,28 @@ do
sleep 1
done
done
done

k=2
echo "Testing Service IP: ${servIP[k]} source 10.10.10.2"
lcode=0
for j in {0..2}
do
res=$($hexec l3h1 curl --max-time 2 -s ${servIP[k]}:2020 --interface 10.10.10.2)
echo $res
if [[ $res != "" ]]
then
lcode=1
fi
sleep 1
done
if [[ $lcode == 0 ]]
then
echo SCENARIO-tcplb with ${servIP[k]} [OK]
else
echo SCENARIO-tcplb with ${servIP[k]} [FAILED]
code=1
fi
done

sudo killall -9 node 2>&1 > /dev/null
exit $code

0 comments on commit 35b5e0e

Please sign in to comment.