projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
166e68f
)
test_storage: add coverage for readonly_storage
author
Brian Warner
<warner@allmydata.com>
Tue, 17 Jun 2008 00:52:13 +0000
(17:52 -0700)
committer
Brian Warner
<warner@allmydata.com>
Tue, 17 Jun 2008 00:52:13 +0000
(17:52 -0700)
src/allmydata/test/test_storage.py
patch
|
blob
|
history
diff --git
a/src/allmydata/test/test_storage.py
b/src/allmydata/test/test_storage.py
index 89a9d51bfe8290794a89fd87a50e76beeb3c358c..e6218435f1fab5e55dd3d69d2b8dce14f9e4a5e5 100644
(file)
--- 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):