beginnings of a system test, with 5 nodes and a queen

This commit is contained in:
Brian Warner 2006-12-02 18:30:18 -07:00
parent d13f9289ef
commit 114d71cb5f

View 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)))