]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
beginnings of a system test, with 5 nodes and a queen
authorBrian Warner <warner@lothar.com>
Sun, 3 Dec 2006 01:30:18 +0000 (18:30 -0700)
committerBrian Warner <warner@lothar.com>
Sun, 3 Dec 2006 01:30:18 +0000 (18:30 -0700)
allmydata/test/test_system.py [new file with mode: 0644]

diff --git a/allmydata/test/test_system.py b/allmydata/test/test_system.py
new file mode 100644 (file)
index 0000000..41a236a
--- /dev/null
@@ -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)))
+