mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 18:06:46 +00:00
test/test_mutable: refactor publish surprise test into common test fixture, rewrite test_publish_surprise to use test fixture
This commit is contained in:
parent
8c7406508a
commit
19cf58f2aa
@ -2500,11 +2500,12 @@ class FirstServerGetsDeleted:
|
||||
return retval
|
||||
|
||||
class Problems(GridTestMixin, unittest.TestCase, testutil.ShouldFailMixin):
|
||||
def test_publish_surprise(self):
|
||||
self.basedir = "mutable/Problems/test_publish_surprise"
|
||||
def do_publish_surprise(self, version):
|
||||
self.basedir = "mutable/Problems/test_publish_surprise_%s" % version
|
||||
self.set_up_grid()
|
||||
nm = self.g.clients[0].nodemaker
|
||||
d = nm.create_mutable_file(MutableData("contents 1"))
|
||||
d = nm.create_mutable_file(MutableData("contents 1"),
|
||||
version=version)
|
||||
def _created(n):
|
||||
d = defer.succeed(None)
|
||||
d.addCallback(lambda res: n.get_servermap(MODE_WRITE))
|
||||
@ -2528,6 +2529,9 @@ class Problems(GridTestMixin, unittest.TestCase, testutil.ShouldFailMixin):
|
||||
d.addCallback(_created)
|
||||
return d
|
||||
|
||||
def test_publish_surprise(self):
|
||||
return self.do_publish_surprise(SDMF_VERSION)
|
||||
|
||||
def test_retrieve_surprise(self):
|
||||
self.basedir = "mutable/Problems/test_retrieve_surprise"
|
||||
self.set_up_grid()
|
||||
|
Loading…
x
Reference in New Issue
Block a user