From: Brian Warner Date: Sun, 3 Dec 2006 01:30:18 +0000 (-0700) Subject: beginnings of a system test, with 5 nodes and a queen X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~492 X-Git-Url: https://git.rkrishnan.org/(%5B%5E?a=commitdiff_plain;h=114d71cb5f4fe3582dd445ca3b54e460c902543f;p=tahoe-lafs%2Ftahoe-lafs.git beginnings of a system test, with 5 nodes and a queen --- diff --git a/allmydata/test/test_system.py b/allmydata/test/test_system.py new file mode 100644 index 00000000..41a236a2 --- /dev/null +++ b/allmydata/test/test_system.py @@ -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))) +