Module: kamailio
Branch: master
Commit: 9aacde29170458e6df15e19fbb4e0f43243fe68b
URL:
https://github.com/kamailio/kamailio/commit/9aacde29170458e6df15e19fbb4e0f4…
Author: Mikko Lehto <mslehto(a)iki.fi>
Committer: Mikko Lehto <mslehto(a)iki.fi>
Date: 2017-01-11T01:45:06+02:00
test/unit: update unit test 2 & 4
- mi_fifo changed to jsonrpcs
- no more mi_datagram
- sh instead of bash
---
Modified: test/unit/2.cfg
Modified: test/unit/2.sh
Modified: test/unit/4.sh
---
Diff:
https://github.com/kamailio/kamailio/commit/9aacde29170458e6df15e19fbb4e0f4…
Patch:
https://github.com/kamailio/kamailio/commit/9aacde29170458e6df15e19fbb4e0f4…
---
diff --git a/test/unit/2.cfg b/test/unit/2.cfg
index c44c894..4fd962a 100644
--- a/test/unit/2.cfg
+++ b/test/unit/2.cfg
@@ -20,8 +20,7 @@ loadmodule "group"
loadmodule "htable"
loadmodule "imc"
loadmodule "maxfwd"
-loadmodule "mi_datagram"
-loadmodule "mi_fifo"
+loadmodule "jsonrpcs"
loadmodule "msilo"
loadmodule "nathelper"
##loadmodule "nat_traversal"
@@ -51,8 +50,8 @@ loadmodule "rtpproxy/rtpproxy.so"
loadmodule "xlog"
loadmodule "pdb/pdb.so"
-modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
-modparam("mi_datagram", "socket_name",
"/tmp/kamailio.sock")
+modparam("jsonrpcs", "transport", 2)
+modparam("jsonrpcs", "fifo_name", "kamailio_rpc.fifo")
modparam("dialog", "dlg_flag", 10)
modparam("dialog", "db_mode", 2)
##modparam("tm", "fr_inv_timer_avp", "$avp(i:704)")
diff --git a/test/unit/2.sh b/test/unit/2.sh
index aaa249d..66cb5fb 100755
--- a/test/unit/2.sh
+++ b/test/unit/2.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# load all modules without external dependencies with mysql
# Copyright (C) 2007 1&1 Internet AG
@@ -35,8 +35,8 @@ cp $CFG $CFG.bak
touch dispatcher.list
-printf "loadmodule \"db_mysql/db_mysql.so\"" >> $CFG
-printf "modparam(\"dispatcher\", \"list_file\",
\"dispatcher.list\")" >> $CFG
+printf "loadmodule \"db_mysql/db_mysql.so\"\n" >> $CFG
+printf "modparam(\"dispatcher\", \"list_file\",
\"dispatcher.list\")\n" >> $CFG
printf "\nrequest_route {\n ;\n}" >> $CFG
# start
diff --git a/test/unit/4.sh b/test/unit/4.sh
index 41e599d..4cc81fd 100755
--- a/test/unit/4.sh
+++ b/test/unit/4.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# test basic fifo functionality
# Copyright (C) 2007 1&1 Internet AG
@@ -29,18 +29,17 @@ if ! (check_kamailio); then
fi ;
# setup config
-printf "loadmodule \"mi_fifo/mi_fifo.so\"" > $CFG
-printf "loadmodule \"kex/kex.so\"" >> $CFG
-printf "modparam(\"mi_fifo\", \"fifo_name\",
\"/tmp/kamailio_fifo\")" >> $CFG
+printf "loadmodule \"jsonrpcs.so\"\n" > $CFG
+printf "modparam(\"jsonrpcs\", \"transport\", 2)\n"
>> $CFG
+printf "modparam(\"jsonrpcs\", \"fifo_name\",
\"$RPCFIFOPATH\")\n" >> $CFG
printf "\nrequest_route {\n ;\n}" >> $CFG
-
$BIN -L $MOD_DIR -Y $RUN_DIR -P $PIDFILE -w . -f $CFG > /dev/null
ret=$?
if [ "$ret" -eq 0 ] ; then
sleep 1
- $CTL version > /dev/null
+ $CTL rpc core.version > /dev/null
ret=$?
fi ;