From: Zooko O'Whielacronx Date: Mon, 13 Apr 2009 02:36:21 +0000 (-0700) Subject: tests: remove obsolete test (it tests functionality that is long gone) which occasion... X-Git-Tag: allmydata-tahoe-1.4.0~10 X-Git-Url: https://git.rkrishnan.org/listings/pb1server.py?a=commitdiff_plain;h=6350634ee30d96172729834582336c3e1265ab51;p=tahoe-lafs%2Ftahoe-lafs.git tests: remove obsolete test (it tests functionality that is long gone) which occasionally ERRORs now that we have more metadata (since [20090411225205-92b7f-7adfb89cb4db4ac7d28427934dea3d2c108f6476]) --- diff --git a/src/allmydata/test/test_dirnode.py b/src/allmydata/test/test_dirnode.py index 6cd80ecd..656d8903 100644 --- a/src/allmydata/test/test_dirnode.py +++ b/src/allmydata/test/test_dirnode.py @@ -104,38 +104,6 @@ class Dirnode(unittest.TestCase, d.addCallback(_done) 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): d = self.client.create_empty_dirnode() d.addCallback(lambda dn: dn.check(Monitor()))