Module: sip-router
Branch: master
Commit: a34219547aea940755ea1b4532e0b672f8363c51
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a342195…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Wed Oct 14 16:53:27 2009 +0300
Test 20.sh fixed
Fixed module loading
Checked contact data into location db as using localhost couldn't be resolved by ser
Fixed regex for ACC as new dprint sources add some extra info
---
test/unit/20.cfg | 8 ++++----
test/unit/20.sh | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/test/unit/20.cfg b/test/unit/20.cfg
index 409ca1a..7405967 100644
--- a/test/unit/20.cfg
+++ b/test/unit/20.cfg
@@ -6,16 +6,16 @@ fork=yes
log_stderror=yes
listen=127.0.0.1
port=5059
-dns=no
+dns=yes
rev_dns=no
#-----------------------Loading Modiules-------------------------------------
-mpath="../modules/"
-loadmodule "db_mysql/db_mysql.so"
+mpath="../../modules_k/"
+loadmodule "../../modules/tm/tm.so"
+loadmodule "../../modules/db_mysql/db_mysql.so"
loadmodule "usrloc/usrloc.so"
loadmodule "registrar/registrar.so"
loadmodule "sl/sl.so"
-loadmodule "tm/tm.so"
loadmodule "maxfwd/maxfwd.so"
loadmodule "acc/acc.so"
#for debugging purposes only
diff --git a/test/unit/20.sh b/test/unit/20.sh
index 1d2ca8b..d0f14d3 100755
--- a/test/unit/20.sh
+++ b/test/unit/20.sh
@@ -31,15 +31,15 @@ CFG="20.cfg"
TMPFILE=`mktemp -t kamailio-test.XXXXXXXXXX`
# add an registrar entry to the db;
-$MYSQL "INSERT INTO location (username,contact,socket,user_agent,cseq,q) VALUES
(\"foo\",\"sip:foo@localhost\",\"udp:127.0.0.1:5060\",\"ser_test\",1,-1);"
+$MYSQL "INSERT INTO location (username,contact,socket,user_agent,cseq,q) VALUES
(\"foo\",\"sip:foo@127.0.0.1\",\"udp:127.0.0.1:5060\",\"ser_test\",1,-1);"
-sipp -sn uas -bg -i localhost -m 1 -f 10 -p 5060 &> /dev/null
+sipp -sn uas -bg -i 127.0.0.1 -m 1 -f 10 -p 5060 &> /dev/null
-../$BIN -w . -f $CFG &> $TMPFILE
+$BIN -w . -f $CFG &> $TMPFILE
sipp -sn uac -s foo 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 10 -p 5061 &> /dev/null
-egrep
'^ACC:[[:space:]]+transaction[[:space:]]+answered:[[:print:]]*code=200;reason=OK$'
$TMPFILE > /dev/null
+egrep
'ACC:[[:space:]]+transaction[[:space:]]+answered:[[:print:]]*code=200;reason=OK$'
$TMPFILE > /dev/null
ret=$?
# cleanup
@@ -47,6 +47,6 @@ killall -9 sipp &> /dev/null
$KILL &> /dev/null
rm $TMPFILE
-$MYSQL "DELETE FROM location WHERE ((contact = \"sip:foo@localhost\") and
(user_agent = \"ser_test\"));"
+$MYSQL "DELETE FROM location WHERE ((contact = \"sip:foo@127.0.0.1\") and
(user_agent = \"ser_test\"));"
exit $ret;