mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
tests: remove obsolete test (it tests functionality that is long gone) which occasionally ERRORs now that we have more metadata (since [20090411225205-92b7f-7adfb89cb4db4ac7d28427934dea3d2c108f6476])
This commit is contained in:
parent
6b9899ade1
commit
6350634ee3
@ -104,38 +104,6 @@ class Dirnode(unittest.TestCase,
|
|||||||
d.addCallback(_done)
|
d.addCallback(_done)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def test_corrupt(self):
|
|
||||||
d = self.client.create_empty_dirnode()
|
|
||||||
def _created(dn):
|
|
||||||
u = make_mutable_file_uri()
|
|
||||||
d = dn.set_uri(u"child", u.to_string(), {})
|
|
||||||
d.addCallback(lambda res: dn.list())
|
|
||||||
def _check1(children):
|
|
||||||
self.failUnless(u"child" in children)
|
|
||||||
d.addCallback(_check1)
|
|
||||||
d.addCallback(lambda res:
|
|
||||||
self.shouldFail(NoSuchChildError, "get bogus", None,
|
|
||||||
dn.get, u"bogus"))
|
|
||||||
def _corrupt(res):
|
|
||||||
filenode = dn._node
|
|
||||||
si = IURI(filenode.get_uri()).storage_index
|
|
||||||
old_contents = filenode.all_contents[si]
|
|
||||||
# We happen to know that the writecap MAC is near the end of the string. Flip
|
|
||||||
# one of its bits and make sure we ignore the corruption.
|
|
||||||
new_contents = testutil.flip_bit(old_contents, -10)
|
|
||||||
# TODO: also test flipping bits in the other portions
|
|
||||||
filenode.all_contents[si] = new_contents
|
|
||||||
d.addCallback(_corrupt)
|
|
||||||
def _check2(res):
|
|
||||||
d = dn.list()
|
|
||||||
def _c3(res):
|
|
||||||
self.failUnless(res.has_key('child'))
|
|
||||||
d.addCallback(_c3)
|
|
||||||
d.addCallback(_check2)
|
|
||||||
return d
|
|
||||||
d.addCallback(_created)
|
|
||||||
return d
|
|
||||||
|
|
||||||
def test_check(self):
|
def test_check(self):
|
||||||
d = self.client.create_empty_dirnode()
|
d = self.client.create_empty_dirnode()
|
||||||
d.addCallback(lambda dn: dn.check(Monitor()))
|
d.addCallback(lambda dn: dn.check(Monitor()))
|
||||||
|
Loading…
Reference in New Issue
Block a user