Explorar o código

- add some variables to test 19

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4429 689a6050-402a-0410-94f2-e92a70836424
Henning Westerholt %!s(int64=17) %!d(string=hai) anos
pai
achega
0b2730e443
Modificáronse 2 ficheiros con 9 adicións e 5 borrados
  1. 1 1
      test/unit/19.cfg
  2. 8 4
      test/unit/19.sh

+ 1 - 1
test/unit/19.cfg

@@ -5,7 +5,7 @@ debug=3
 fork=yes
 log_stderror=no
 listen=127.0.0.1
-port=5059
+port=5060
 dns=no
 rev_dns=no
 

+ 8 - 4
test/unit/19.sh

@@ -26,13 +26,17 @@ if ! (check_sipp && check_openser); then
 fi ;
 
 CFG=19.cfg
+SRV=5060
+UAS=5070
+UAC=5080
+
 
 # add an registrar entry to the db;
-mysql --show-warnings -B -u openser --password=openserrw -D openser -e "INSERT INTO location (username,contact,socket,user_agent,cseq,q) VALUES (\"foo\",\"sip:foo@localhost\",\"udp:127.0.0.1:5060\",\"ser_test\",1,-1);"
+mysql --show-warnings -B -u openser --password=openserrw -D openser -e "INSERT INTO location (username,contact,socket,user_agent,cseq,q) VALUES (\"foo\",\"sip:foo@localhost:$UAS\",\"udp:127.0.0.1:$UAS\",\"ser_test\",1,-1);"
 
 ../openser -w . -f $CFG &> /dev/null
-sipp -sn uas -bg -i localhost -m 10 -f 2 -p 5060 &> /dev/null
-sipp -sn uac -s foo 127.0.0.1:5059 -i 127.0.0.1 -m 10 -f 2 -p 5061 &> /dev/null
+sipp -sn uas -bg -i localhost -m 10 -f 2 -p $UAS &> /dev/null
+sipp -sn uac -s foo 127.0.0.1:$SRV -i localhost -m 10 -f 2 -p $UAC &> /dev/null
 
 ret=$?
 
@@ -40,5 +44,5 @@ ret=$?
 killall -9 sipp > /dev/null 2>&1
 killall -9 openser > /dev/null 2>&1
 
-mysql  --show-warnings -B -u openser --password=openserrw -D openser -e "DELETE FROM location WHERE ((contact = \"sip:foo@localhost\") and (user_agent = \"ser_test\"));"
+mysql  --show-warnings -B -u openser --password=openserrw -D openser -e "DELETE FROM location WHERE ((contact = \"sip:foo@localhost:$UAS\") and (user_agent = \"ser_test\"));"
 exit $ret;