From: Brian Warner <warner@allmydata.com> Date: Tue, 17 Jun 2008 00:52:13 +0000 (-0700) Subject: test_storage: add coverage for readonly_storage X-Git-Tag: allmydata-tahoe-1.2.0~87 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20//%22%22?a=commitdiff_plain;h=75e662cc4613d2d73272ebdec61455bd32545bc4;p=tahoe-lafs%2Ftahoe-lafs.git test_storage: add coverage for readonly_storage --- diff --git a/src/allmydata/test/test_storage.py b/src/allmydata/test/test_storage.py index 89a9d51b..e6218435 100644 --- a/src/allmydata/test/test_storage.py +++ b/src/allmydata/test/test_storage.py @@ -489,6 +489,16 @@ class Server(unittest.TestCase): leases = list(ss.get_leases("si3")) self.failUnlessEqual(len(leases), 2) + def test_readonly(self): + workdir = self.workdir("test_readonly") + ss = StorageServer(workdir, readonly_storage=True) + ss.setServiceParent(self.sparent) + + canary = FakeCanary() + already,writers = self.allocate(ss, "vid", [0,1,2], 75) + self.failUnlessEqual(already, set()) + self.failUnlessEqual(writers, {}) + class MutableServer(unittest.TestCase):