فهرست منبع

- small fix in test 2
- add new test for presence related modules startup on mysql


git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4451 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt 17 سال پیش
والد
کامیت
6135eabdf2
3فایلهای تغییر یافته به همراه74 افزوده شده و 3 حذف شده
  1. 4 3
      test/unit/2.sh
  2. 21 0
      test/unit/34.cfg
  3. 49 0
      test/unit/34.sh

+ 4 - 3
test/unit/2.sh

@@ -21,12 +21,13 @@
 
 # Needs a default openser database setup for mysql
 
-if [ ! -e ../modules/db_mysql/db_mysql.so ] ; then
-	echo "mysql driver not found, not run"
+source include/require
+CFG=2.cfg
+
+if ! (check_openser && check_module "db_mysql" ); then
 	exit 0
 fi ;
 
-CFG=2.cfg
 cp $CFG $CFG.bak
 
 touch dispatcher.list

+ 21 - 0
test/unit/34.cfg

@@ -0,0 +1,21 @@
+mpath="../modules"
+loadmodule "sl.so"
+loadmodule "tm.so"
+loadmodule "usrloc.so"
+loadmodule "presence.so"
+loadmodule "presence_xml.so"
+loadmodule "presence_mwi.so"
+loadmodule "pua.so"
+loadmodule "pua_bla.so"
+loadmodule "pua_mi.so"
+loadmodule "pua_usrloc.so"
+loadmodule "xmpp.so"
+loadmodule "pua_xmpp.so"
+loadmodule "xcap_client.so"
+loadmodule "rls.so"
+
+modparam("rls", "xcap_root", "http://localhost/xcap-root:8000")
+modparam("presence_xml", "integrated_xcap_server", 1)
+modparam("pua_bla|pua_usrloc", "default_domain", "localhost")
+modparam("pua_bla", "header_name", "Sender")
+modparam("pua_bla|pua_xmpp", "server_address", "sip:[email protected]")

+ 49 - 0
test/unit/34.sh

@@ -0,0 +1,49 @@
+#!/bin/bash
+# load all presence related modules with mysql
+
+# Copyright (C) 2008 1&1 Internet AG
+#
+# This file is part of openser, a free SIP server.
+#
+# openser is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version
+#
+# openser is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+# Needs a default openser database setup for mysql
+
+source include/require
+CFG=34.cfg
+
+if ! (check_openser && check_module "db_mysql" && check_module "presence" \
+		&& check_module "presence_xml" && check_module "pua" \
+		&& check_module "xcap_client" && check_module "rls" \
+		&& check_module "presence_mwi" && check_module "pua_bla" \
+		&& check_module "pua_mi" && check_module "pua_usrloc" \
+		&& check_module "pua_xmpp" && check_module "xmpp"); then
+	exit 0
+fi ;
+
+cp $CFG $CFG.bak
+
+echo "loadmodule \"db_mysql/db_mysql.so\"" >> $CFG
+
+# start
+../openser -w . -f $CFG > /dev/null
+ret=$?
+
+sleep 1
+killall -9 openser
+
+mv $CFG.bak $CFG
+
+exit $ret