@@ -176,10 +176,10 @@ def start(self, TestCaseFile):
176176 return ret
177177
178178 def pre_test (self ):
179- os . system ( "../../spectrum/src/spectrum2 -n ./" + self . config + " > spectrum2.log &" )
179+ pass
180180
181181 def post_test (self ):
182- os . system ( "killall -w spectrum2" )
182+ pass
183183
184184class LibcommuniServerModeSingleServerConf (BaseTest ):
185185 def __init__ (self ):
@@ -191,29 +191,11 @@ def skip_test(self, test):
191191 return True
192192 return False
193193
194- def pre_test (self ):
195- BaseTest .pre_test (self )
196- os .system ("/usr/sbin/ngircd -f ../libcommuni/ngircd.conf &" )
197-
198- def post_test (self ):
199- os .system ("killall -w ngircd 2>/dev/null" )
200- os .system ("killall -w spectrum2_libcommuni_backend 2>/dev/null" )
201- BaseTest .post_test (self )
202-
203194class LibcommuniServerModeConf (BaseTest ):
204195 def __init__ (self ):
205196 BaseTest .__init__ (self , "../libcommuni/irc_test2.cfg" , True , "#channel%localhost@localhost" )
206197 self .directory = "../libcommuni/"
207198
208- def pre_test (self ):
209- BaseTest .pre_test (self )
210- os .system ("/usr/sbin/ngircd -f ../libcommuni/ngircd.conf &" )
211-
212- def post_test (self ):
213- os .system ("killall -w ngircd 2>/dev/null" )
214- os .system ("killall -w spectrum2_libcommuni_backend 2>/dev/null" )
215- BaseTest .post_test (self )
216-
217199class JabberServerModeConf (BaseTest ):
218200 def __init__ (self ):
219201 BaseTest .__init__ (self , "../libpurple_jabber/jabber_test.cfg" , True , "room%conference.localhost@localhostxmpp" )
@@ -233,68 +215,13 @@ def skip_test(self, test):
233215 def pre_test (self ):
234216 os .system ("cp ../libpurple_jabber/prefs.xml ./ -f >/dev/null" )
235217 BaseTest .pre_test (self )
236- os .system ("prosody --config ../libpurple_jabber/prosody.cfg.lua >prosody.log &" )
237- time .sleep (3 )
238- os .system ("../../spectrum_manager/src/spectrum2_manager -c ../libpurple_jabber/manager.conf localhostxmpp register client%localhost@localhostxmpp client@localhost password 2>/dev/null >/dev/null" )
239- os .system ("../../spectrum_manager/src/spectrum2_manager -c ../libpurple_jabber/manager.conf localhostxmpp register responder%localhost@localhostxmpp responder@localhost password 2>/dev/null >/dev/null" )
240-
241- def post_test (self ):
242- os .system ("killall -w -r lua.* 2>/dev/null" )
243- os .system ("killall -w spectrum2_libpurple_backend 2>/dev/null" )
244- BaseTest .post_test (self )
245-
246- class JabberSlackServerModeConf (BaseTest ):
247- def __init__ (self ):
248- BaseTest .__init__ (self , "../slack_jabber/jabber_slack_test.cfg" , True , "room%conference.localhost@localhostxmpp" )
249- self .directory = "../slack_jabber/"
250- self .client_jid = "client@localhost"
251- self .
client_room = "[email protected] " 252- # Implicitly forces responder to connect to slack.com instead of localhost
253- # by passing a nonstandard responder_roompassword
254- self .
responder_jid = "[email protected] " 255- self .responder_password = "spectrum2tests.e2zJwtKjLhLmt14VsMKq"
256- self .
responder_room = "[email protected] " 257- self .responder_nick = "owner"
258- self .responder_roompassword = "spectrum2tests.e2zJwtKjLhLmt14VsMKq"
259-
260- def skip_test (self , test ):
261- os .system ("cp ../slack_jabber/slack.sql ." )
262- if test .find ("bad_password" ) != - 1 :
263- print ("Changing password to 'badpassword'" )
264- os .system ("sqlite3 slack.sql \" UPDATE users SET password='badpassword' WHERE id=1\" " )
265- return False
266-
267- def pre_test (self ):
268- BaseTest .pre_test (self )
269- os .system ("prosody --config ../slack_jabber/prosody.cfg.lua > prosody.log &" )
270-
271- def post_test (self ):
272- os .system ("killall -w -r lua.* 2>/dev/null" )
273- os .system ("killall -w spectrum2_libpurple_backend 2>/dev/null" )
274- BaseTest .post_test (self )
275-
276- class TwitterServerModeConf (BaseTest ):
277- def __init__ (self ):
278- BaseTest .__init__ (self , "../twitter/twitter_test.cfg" , True , "" )
279- self .directory = "../twitter/"
280- self .client_password = "testpass123"
281-
282- def skip_test (self , test ):
283- os .system ("cp ../twitter/twitter.sql ." )
284-
285- def pre_test (self ):
286- BaseTest .pre_test (self )
287-
288- def post_test (self ):
289- os .system ("killall -w spectrum2_twitter_backend 2>/dev/null" )
290- BaseTest .post_test (self )
218+ os .system ("spectrum2_manager localhostxmpp register client%localhost@localhostxmpp client@localhost password" )
219+ os .system ("spectrum2_manager localhostxmpp register responder%localhost@localhostxmpp responder@localhost password" )
291220
292221configurations = []
293222configurations .append (LibcommuniServerModeSingleServerConf ())
294223configurations .append (LibcommuniServerModeConf ())
295224configurations .append (JabberServerModeConf ())
296- #configurations.append(JabberSlackServerModeConf())
297- #configurations.append(TwitterServerModeConf())
298225
299226exitcode = 0
300227
0 commit comments