@@ -176,10 +176,10 @@ def start(self, TestCaseFile):
176
176
return ret
177
177
178
178
def pre_test (self ):
179
- os . system ( "../../spectrum/src/spectrum2 -n ./" + self . config + " > spectrum2.log &" )
179
+ pass
180
180
181
181
def post_test (self ):
182
- os . system ( "killall -w spectrum2" )
182
+ pass
183
183
184
184
class LibcommuniServerModeSingleServerConf (BaseTest ):
185
185
def __init__ (self ):
@@ -191,29 +191,11 @@ def skip_test(self, test):
191
191
return True
192
192
return False
193
193
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
-
203
194
class LibcommuniServerModeConf (BaseTest ):
204
195
def __init__ (self ):
205
196
BaseTest .__init__ (self , "../libcommuni/irc_test2.cfg" , True , "#channel%localhost@localhost" )
206
197
self .directory = "../libcommuni/"
207
198
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
-
217
199
class JabberServerModeConf (BaseTest ):
218
200
def __init__ (self ):
219
201
BaseTest .__init__ (self , "../libpurple_jabber/jabber_test.cfg" , True , "room%conference.localhost@localhostxmpp" )
@@ -233,68 +215,13 @@ def skip_test(self, test):
233
215
def pre_test (self ):
234
216
os .system ("cp ../libpurple_jabber/prefs.xml ./ -f >/dev/null" )
235
217
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" )
291
220
292
221
configurations = []
293
222
configurations .append (LibcommuniServerModeSingleServerConf ())
294
223
configurations .append (LibcommuniServerModeConf ())
295
224
configurations .append (JabberServerModeConf ())
296
- #configurations.append(JabberSlackServerModeConf())
297
- #configurations.append(TwitterServerModeConf())
298
225
299
226
exitcode = 0
300
227
0 commit comments