Module: sip-router Branch: master Commit: 050b5667fcba38c5889da75556695a26a2ea7dd5 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=050b5667...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Sun Oct 5 22:25:20 2014 +0200
test/unit: updated unit 21.sh
---
test/unit/21.cfg | 8 +++----- test/unit/21.sh | 21 ++++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/test/unit/21.cfg b/test/unit/21.cfg index bde78d7..74b237b 100644 --- a/test/unit/21.cfg +++ b/test/unit/21.cfg @@ -1,8 +1,6 @@ # -# $Id: kamailio.cfg 2825 2007-09-27 09:05:52Z henningw $ -# # simple quick-start config script -# Please refer to the Core CookBook at http://www.kamailio.org/dokuwiki/doku.php +# Please refer to the Core CookBook at http://www.kamailio.org/wiki/ # for a explanation of possible statements, functions and parameters. #
@@ -22,7 +20,7 @@ rev_dns=no # ------------------ module loading ----------------------------------
#set module path -loadpath "../../modules_k/:../../modules/" +loadpath "../../modules/"
# Uncomment this if you want to use SQL database loadmodule "db_mysql/db_mysql.so" @@ -74,7 +72,7 @@ route{ }
if (is_method("ACK")) { - xlog("ACK"); + xlog("ACK\n"); sl_send_reply("200","OK"); exit; } diff --git a/test/unit/21.sh b/test/unit/21.sh index 4ee2fc5..bd445b2 100755 --- a/test/unit/21.sh +++ b/test/unit/21.sh @@ -1,5 +1,5 @@ #!/bin/bash -# tests the authentification via auth_db and uri_db +# tests the authentification via auth_db
# Copyright (C) 2007 1&1 Internet AG # @@ -31,25 +31,28 @@ fi ; CFG=21.cfg
# add an registrar entry to the db; -$MYSQL "INSERT INTO subscriber (username, domain, password, email_address) VALUES ("alice","localhost","alice","alice@localhost");" +$MYSQL "INSERT INTO subscriber (username, domain, password) VALUES ("alice","localhost","alice");"
-$BIN -w . -f $CFG &> /dev/null; +$BIN -w . -f $CFG -E -e -dd > /dev/null 2>&1 ret=$? + sleep 1
if [ "$ret" -eq 0 ] ; then - sipp -s alice 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 1 -auth_uri alice@localhost -p 5061 -sf reg_auth.xml -ap alice &> /dev/null; + sipp -s alice 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 1 -auth_uri alice@localhost -p 5061 -sf reg_auth.xml -ap alice > /dev/null 2>&1 & ret=$? -fi; +fi
if [ "$ret" -eq 0 ] ; then - sipp -s alice 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 1 -auth_uri alice@localhost -p 5061 -sf inv_auth.xml -ap alice &> /dev/null; + sipp -s alice 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 1 -auth_uri alice@localhost -p 5061 -sf inv_auth.xml -ap alice > /dev/null 2>&1 & ret=$? -fi; +fi + +sleep 1
#cleanup -$KILL &> /dev/null; -killall -9 sipp &> /dev/null; +$KILL > /dev/null +killall -9 sipp > /dev/null 2>&1 $MYSQL "DELETE FROM subscriber WHERE((username = "alice") and (domain = "localhost"));"
exit $ret;