[sr-dev] git:master: tests: fix test sipp scenario

Henning Westerholt hw at kamailio.org
Sun Apr 21 19:53:28 CEST 2013


Module: sip-router
Branch: master
Commit: be4b94efde40180d642af0e87f15f4c9bdc4ce7b
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=be4b94efde40180d642af0e87f15f4c9bdc4ce7b

Author: Henning Westerholt <hw at kamailio.org>
Committer: Henning Westerholt <hw at kamailio.org>
Date:   Sun Apr 21 19:51:34 2013 +0200

tests: fix test sipp scenario

---

 test/unit/45.cfg |    5 ++---
 test/unit/45.sh  |    9 +++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/test/unit/45.cfg b/test/unit/45.cfg
index a77b564..f2b8c93 100644
--- a/test/unit/45.cfg
+++ b/test/unit/45.cfg
@@ -41,7 +41,7 @@ route{
 	$mct(test) = 5;
 	xlog("stored value is $mct(test)");
 	$mct(test) = $null;
-	xlog("stored value is $mct(test)");
+	xlog("stored value is $mct(test) - expected empty");
 
 	$mct(cnt) = 1;
 	$mcinc(cnt) = 1; # increment by 1
@@ -52,8 +52,7 @@ route{
 	$mct(test) = 111;
 	xlog("stored value is $mct(test)");
 	$mctex(test) = 1;
-# also not work at the moment?
-#	sleep("2");
+	sleep("2");
 	xlog("stored value is now $mct(test)");
 
 	if (registered("location")) {
diff --git a/test/unit/45.sh b/test/unit/45.sh
index 7b28c64..5f11519 100755
--- a/test/unit/45.sh
+++ b/test/unit/45.sh
@@ -34,11 +34,12 @@ UAC=5080
 
 
 # add an registrar entry to the db;
-$MYSQL "INSERT INTO location (username,contact,socket,user_agent,cseq,q) VALUES (\"foo\",\"sip:foo at localhost:$UAS\",\"udp:127.0.0.1:$UAS\",\"ser_test\",1,-1);"
+$MYSQL "INSERT INTO location (username,contact,socket,user_agent,cseq,q) VALUES (\"foo\",\"sip:foo at 127.0.0.1:$UAS\",\"udp:127.0.0.1:$UAS\",\"ser_test\",1,-1);"
 
 $BIN -w . -f $CFG &> /dev/null
-sipp -sn uas -bg -i localhost -m 10 -f 2 -p $UAS &> /dev/null
-sipp -sn uac -s foo 127.0.0.1:$SRV -i localhost -m 10 -f 2 -p $UAC &> /dev/null
+
+sipp -sn uas -bg -i 127.0.0.1 -m 10 -f 2 -p $UAS &> /dev/null
+sipp -sn uac -s foo 127.0.0.1:$SRV -i 127.0.0.1 -m 10 -f 2 -p $UAC &> /dev/null
 
 ret=$?
 
@@ -46,5 +47,5 @@ ret=$?
 killall -9 sipp > /dev/null 2>&1
 $KILL > /dev/null 2>&1
 
-$MYSQL "DELETE FROM location WHERE ((contact = \"sip:foo at localhost:$UAS\") and (user_agent = \"ser_test\"));"
+$MYSQL "DELETE FROM location WHERE ((contact = \"sip:foo at 127.0.0.1:$UAS\") and (user_agent = \"ser_test\"));"
 exit $ret;




More information about the sr-dev mailing list