Module: sip-router
Branch: master
Commit: 658010d634f520d250978ee57839bdfc5f03f6eb
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=658010d…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Thu May 14 16:25:59 2009 +0200
test: port carrierroute config load test to sr, add missing tmx mod to test 13
---
test/unit/13.cfg | 5 +----
test/unit/14.cfg | 22 +++++++---------------
test/unit/14.sh | 10 +++-------
3 files changed, 11 insertions(+), 26 deletions(-)
diff --git a/test/unit/13.cfg b/test/unit/13.cfg
index 509d3f6..aac3cab 100644
--- a/test/unit/13.cfg
+++ b/test/unit/13.cfg
@@ -6,6 +6,7 @@ loadmodule "xlog"
loadmodule "maxfwd"
loadmodule "../../modules/carrierroute/carrierroute.so"
loadmodule "pv"
+loadmodule "tmx"
loadmodule "mi_fifo"
modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
@@ -16,10 +17,6 @@ route{
sl_send_reply("483","Too Many Hops");
return;
};
-# if (msg:len > max_len) {
-# sl_send_reply("513", "Message too big");
-# return;
-# };
cr_user_carrier("$fU", "$fd", "$avp(s:11)");
$avp(domain)="start";
if (!cr_route("$avp(carrier)", "$avp(s:10)", "$rU",
"$rU", "call_id", "$avp(s:12)")) {
diff --git a/test/unit/14.cfg b/test/unit/14.cfg
index bb121ca..dde83a0 100644
--- a/test/unit/14.cfg
+++ b/test/unit/14.cfg
@@ -1,27 +1,19 @@
-mpath="../modules"
-loadmodule "sl/sl.so"
-loadmodule "xlog/xlog.so"
-loadmodule "maxfwd/maxfwd.so"
-loadmodule "carrierroute/carrierroute.so"
-loadmodule "pv/pv.so"
-loadmodule "mi_fifo/mi_fifo.so"
+loadpath "../../modules_k"
+loadmodule "sl"
+loadmodule "xlog"
+loadmodule "maxfwd"
+loadmodule "../../modules/carrierroute/carrierroute.so"
+loadmodule "pv"
+loadmodule "mi_fifo"
modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
-avp_aliases="domain=s:10"
-avp_aliases="carrier=s:11"
-avp_aliases="host=s:12"
-
route{
# initial sanity checks
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
return;
};
- if (msg:len > max_len) {
- sl_send_reply("513", "Message too big");
- return;
- };
if (method == "REGISTER") {
if(!cr_route("default", "register", "$rU",
"$rU", "call_id", "$avp(s:30)")) {
sl_send_reply("403", "Not allowed");
diff --git a/test/unit/14.sh b/test/unit/14.sh
index 1db9d4f..b4fdc2f 100755
--- a/test/unit/14.sh
+++ b/test/unit/14.sh
@@ -31,19 +31,17 @@ fi ;
cp $CFG $CFG.bak
# setup config
-echo "modparam(\"carrierroute\", \"config_file\",
\"`pwd`/../test/carrierroute.cfg\")" >> $CFG
+echo "modparam(\"carrierroute\", \"config_file\",
\"carrierroute.cfg\")" >> $CFG
-../$BIN -w . -f $CFG > /dev/null
+$BIN -w . -f $CFG > /dev/null
ret=$?
sleep 1
-cd ../scripts
-
TMPFILE=`mktemp -t kamailio-test.XXXXXXXXXX`
if [ "$ret" -eq 0 ] ; then
- ./$CTL fifo cr_dump_routes > $TMPFILE
+ $CTL fifo cr_dump_routes > $TMPFILE
ret=$?
fi ;
@@ -78,8 +76,6 @@ fi ;
$KILL
-cd ../test
-
mv $CFG.bak $CFG
rm -f $TMPFILE