From 114d71cb5f4fe3582dd445ca3b54e460c902543f Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sat, 2 Dec 2006 18:30:18 -0700 Subject: [PATCH] beginnings of a system test, with 5 nodes and a queen --- allmydata/test/test_system.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 allmydata/test/test_system.py 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))) + -- 2.45.2