Browse Source

- add test for bug 1829002, config check
- fix test 2, extend comment in 3


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

Henning Westerholt 18 years ago
parent
commit
b8abae51b4
3 changed files with 18 additions and 2 deletions
  1. 4 1
      test/unit/2.sh
  2. 1 1
      test/unit/3.sh
  3. 13 0
      test/unit/6.sh

+ 4 - 1
test/unit/2.sh

@@ -6,7 +6,9 @@
 CFG=2.cfg
 cp $CFG $CFG.bak
 
-echo "modparam(\"dispatcher\", \"list_file\", \"`pwd`/../etc/dispatcher.list\")" >> $CFG
+touch dispatcher.list
+
+echo "modparam(\"dispatcher\", \"list_file\", \"`pwd`/../test/dispatcher.list\")" >> $CFG
 
 # start
 ../openser -f $CFG > /dev/null
@@ -16,5 +18,6 @@ sleep 1
 killall -9 openser
 
 mv $CFG.bak $CFG
+rm -f dispatcher.list
 
 exit $ret

+ 1 - 1
test/unit/3.sh

@@ -2,7 +2,7 @@
 # creates a mysql database with openserdbctl and deletes it again
 
 # Needs a mysql database, the root user password must be given
-# in the file 'dbrootpw'
+# in the file 'dbrootpw' in the test directory
 
 if [ ! -f dbrootpw ] ; then
 	echo "no root password, not run"

+ 13 - 0
test/unit/6.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+# checks a configuration with 'openser -c'
+
+CFG=2.cfg
+
+# start
+../openser -c -f $CFG > /dev/null
+ret=$?
+
+sleep 1
+killall -9 openser
+
+exit $ret