Skip to content
Browse files

more config testing

SVN Revision: 715
  • Loading branch information...
1 parent 2366386 commit ce6f0e6718baa6ffd208a67501bce0d8913976bb @nniclausse nniclausse committed Apr 12, 2007
Showing with 52 additions and 0 deletions.
  1. +46 −0 src/test/badpop.xml
  2. +6 −0 src/test/ts_test_config.erl
View
46 src/test/badpop.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!DOCTYPE tsung SYSTEM "/home/nniclaus/share/tsung/tsung-1.0.dtd">
+<tsung loglevel="notice" version="1.0">
+
+ <clients>
+ <client host="localhost" use_controller_vm="true"></client>
+ </clients>
+
+ <servers> <server host="127.0.0.1" port="5222" type="tcp"></server> </servers>
+
+ <monitoring>
+ <monitor host="foo" type="snmp"/>
+ </monitoring>
+
+ <load>
+ <arrivalphase phase="1" duration="1" unit="minute">
+ <users interarrival="2" unit="second"></users>
+ </arrivalphase>
+ </load>
+
+ <options></options>
+
+ <sessions>
+ <session probability="50" name="jabber-example" type="ts_jabber">
+ <transaction name="offline">
+ <request> <jabber type="chat" ack="no_ack" size="56" destination="offline"></jabber> </request>
+ </transaction>
+ <thinktime value="30"></thinktime>
+ </session>
+
+ <session probability="19" name="jabber-plain" type="ts_jabber">
+ <request> <jabber type="connect" ack="no_ack"></jabber> </request>
+ </session>
+
+ <session probability="20" name="jabber-digest" type="ts_jabber">
+ <transaction name="close">
+ <request> <jabber type="close" ack="no_ack"></jabber> </request>
+ </transaction>
+ </session>
+
+ <session probability="10" name="jabber-sipdigest" type="ts_jabber">
+ <request> <jabber type="connect" ack="no_ack"></jabber> </request>
+ </session>
+ </sessions>
+</tsung>
+
View
6 src/test/ts_test_config.erl
@@ -25,6 +25,12 @@ read_config_jabber_test() ->
myset_env(),
ts_user_server:start([]),
?assertMatch({ok, Config}, ts_config:read("./examples/jabber.xml")).
+read_config_badpop_test() ->
+ myset_env(),
+ ts_user_server:start([]),
+ {ok, Config} = ts_config:read("./src/test/badpop.xml"),
+ ?assertMatch({error,[{error,{bad_sum,_,_}}]}, ts_config_server:check_config(Config)).
+
myset_env()->

0 comments on commit ce6f0e6

Please sign in to comment.
Something went wrong with that request. Please try again.