Module: kamailio
Branch: master
Commit: 25c4d4f32a4b20419e2129398678790037fc2502
URL:
https://github.com/kamailio/kamailio/commit/25c4d4f32a4b20419e2129398678790…
Author: Mikko Lehto <mslehto(a)iki.fi>
Committer: Mikko Lehto <mslehto(a)iki.fi>
Date: 2017-01-11T01:47:31+02:00
test/unit: update unit test 20
- change stream redirection to classic 2>&1
- sh instead of bash
- change mi_fifo to jsonrpcs
---
Modified: test/unit/20.cfg
Modified: test/unit/20.sh
---
Diff:
https://github.com/kamailio/kamailio/commit/25c4d4f32a4b20419e2129398678790…
Patch:
https://github.com/kamailio/kamailio/commit/25c4d4f32a4b20419e2129398678790…
---
diff --git a/test/unit/20.cfg b/test/unit/20.cfg
index 8bcd936..858ab7c 100644
--- a/test/unit/20.cfg
+++ b/test/unit/20.cfg
@@ -18,12 +18,13 @@ loadmodule "sl/sl.so"
loadmodule "maxfwd/maxfwd.so"
loadmodule "acc/acc.so"
#for debugging purposes only
-loadmodule "mi_fifo/mi_fifo.so"
+loadmodule "jsonrpcs/jsonrpcs.so"
loadmodule "xlog/xlog.so"
#-----------------------Module parameters-------------------------------------
-modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
+modparam("jsonrpcs", "transport", 2)
+modparam("jsonrpcs", "fifo_name", "kamailio_rpc.fifo")
modparam("usrloc", "db_mode", 3)
modparam("usrloc", "db_url",
"mysql://kamailio:kamailiorw@127.0.0.1/kamailio")
modparam("acc", "log_flag", 1)
diff --git a/test/unit/20.sh b/test/unit/20.sh
index 2e2fec1..d8d0405 100755
--- a/test/unit/20.sh
+++ b/test/unit/20.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/bin/sh
# test basic accounting functionality
# Copyright (C) 2007 1&1 Internet AG
@@ -33,11 +33,11 @@ TMPFILE=`mktemp -t kamailio-test.XXXXXXXXXX`
# add an registrar entry to the db;
$MYSQL "INSERT INTO location (ruid, username,contact,socket,user_agent,cseq,q)
VALUES
(\"kamailio-test-uid\",\"foo\",\"sip:foo@127.0.0.1\",\"udp:127.0.0.1:5060\",\"kamailio_test\",1,-1);"
-sipp -sn uas -bg -i 127.0.0.1 -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 2>&1
$BIN -L $MOD_DIR -Y $RUN_DIR -P $PIDFILE -w . -f $CFG > $TMPFILE 2>&1
-sipp -sn uac -s foo 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 10 -p 5061 &> /dev/null
+sipp -sn uac -s foo 127.0.0.1:5059 -i 127.0.0.1 -m 1 -f 10 -p 5061 > /dev/null
2>&1
egrep
'ACC:[[:space:]]+transaction[[:space:]]+answered:[[:print:]]*code=200;reason=OK$'
$TMPFILE > /dev/null
ret=$?
@@ -45,7 +45,7 @@ ret=$?
sleep 1
# cleanup
-killall -9 sipp &> /dev/null
+killall -9 sipp > /dev/null 2>&1
kill_kamailio
rm $TMPFILE