mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-21 13:57:51 +00:00
beginnings of a system test, with 5 nodes and a queen
This commit is contained in:
parent
d13f9289ef
commit
114d71cb5f
27
allmydata/test/test_system.py
Normal file
27
allmydata/test/test_system.py
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
from twisted.trial import unittest
|
||||
from twisted.application import service
|
||||
from allmydata import upload, client, queen
|
||||
import os
|
||||
|
||||
class SystemTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.sparent = service.MultiService()
|
||||
self.sparent.startService()
|
||||
def tearDown(self):
|
||||
return self.sparent.stopService()
|
||||
|
||||
def addService(self, s):
|
||||
s.setServiceParent(self.sparent)
|
||||
return s
|
||||
|
||||
def test_it(self):
|
||||
os.mkdir("queen")
|
||||
q = self.addService(queen.Queen(basedir="queen"))
|
||||
clients = []
|
||||
NUMCLIENTS = 5
|
||||
for i in range(NUMCLIENTS):
|
||||
basedir = "client%d" % i
|
||||
os.mkdir(basedir)
|
||||
clients.append(self.addService(client.Client(basedir=basedir)))
|
||||
|
Loading…
Reference in New Issue
Block a user