]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
setup: remove a few minimal unit tests from test_filenode which have been obviated...
authorZooko O'Whielacronx <zooko@zooko.com>
Thu, 25 Sep 2008 16:15:44 +0000 (09:15 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Thu, 25 Sep 2008 16:15:44 +0000 (09:15 -0700)
src/allmydata/immutable/filenode.py
src/allmydata/test/test_filenode.py

index 7edfd358ab8bebbb8970ca0a1cf42b818ae3fee5..2b68d644f7c20dc54c66c57f9add43bff63a6fb2 100644 (file)
@@ -108,8 +108,6 @@ class LiteralFileNode(ImmutableFileNode):
         return None
 
     def check(self, verify=False):
-        # neither verify= nor repair= affect LIT files, and the check returns
-        # no results.
         return defer.succeed(None)
 
     def check_and_repair(self, verify=False):
index 0f759194eac1e6d9066204316bfe0d1f9e5d7563..f7dfd8bf1c7683f61c0b341941402a3e4a8db99d 100644 (file)
@@ -139,8 +139,7 @@ class Checker(unittest.TestCase):
     def test_literal_filenode(self):
         DATA = "I am a short file."
         u = uri.LiteralFileURI(data=DATA)
-        c = None
-        fn1 = filenode.LiteralFileNode(u, c)
+        fn1 = filenode.LiteralFileNode(u, None)
 
         d = fn1.check()
         def _check_checker_results(cr):
@@ -152,29 +151,6 @@ class Checker(unittest.TestCase):
 
         return d
 
-    def test_mutable_filenode(self):
-        client = None
-        wk = "\x00"*16
-        fp = "\x00"*32
-        rk = hashutil.ssk_readkey_hash(wk)
-        si = hashutil.ssk_storage_index_hash(rk)
-
-        u = uri.WriteableSSKFileURI("\x00"*16, "\x00"*32)
-        n = MutableFileNode(client).init_from_uri(u)
-
-        n.checker_class = FakeMutableChecker
-        n.check_and_repairer_class = FakeMutableCheckAndRepairer
-
-        d = n.check()
-        def _check_checker_results(cr):
-            self.failUnless(cr.is_healthy())
-        d.addCallback(_check_checker_results)
-
-        d.addCallback(lambda res: n.check(verify=True))
-        d.addCallback(_check_checker_results)
-
-        return d
-
 class FakeMutableChecker:
     def __init__(self, node):
         self.r = CheckerResults(node.get_storage_index())