From 58722ca61d0a5cd043823588feb347b0f2c289e8 Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Sun, 24 Nov 2024 00:15:26 +0900 Subject: [PATCH] loxilb-io/loxilb#864 more test-cases in cicd scripts --- cicd/tcplb-src/config.sh | 3 ++- cicd/tcplb-src/validation.sh | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/cicd/tcplb-src/config.sh b/cicd/tcplb-src/config.sh index fbf14d197..87c0ab426 100755 --- a/cicd/tcplb-src/config.sh +++ b/cicd/tcplb-src/config.sh @@ -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 diff --git a/cicd/tcplb-src/validation.sh b/cicd/tcplb-src/validation.sh index e7447fb9d..31710a697 100755 --- a/cicd/tcplb-src/validation.sh +++ b/cicd/tcplb-src/validation.sh @@ -51,6 +51,21 @@ 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] @@ -58,7 +73,6 @@ else echo SCENARIO-tcplb with ${servIP[k]} [FAILED] code=1 fi -done sudo killall -9 node 2>&1 > /dev/null exit $code