]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
workqueue: more tests
authorBrian Warner <warner@lothar.com>
Tue, 9 Jan 2007 08:58:50 +0000 (01:58 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 9 Jan 2007 08:58:50 +0000 (01:58 -0700)
src/allmydata/test/test_workqueue.py

index 8d9c3e974b4f5f0363a52b6a5ea32a858061733e..b2b20307f68f2942e6a426414dcbd6350d10f3c5 100644 (file)
@@ -147,11 +147,17 @@ class Items(unittest.TestCase):
         f.write("stuff")
         f.close()
         self.failUnless(os.path.exists(tmpfilename))
+        # likewise this unreferenced box should get deleted
+        boxname = wq.create_boxname()
+        wq.write_to_box(boxname, "contents of box")
+        boxfile = os.path.join(wq.boxesdir, boxname)
+        self.failUnless(os.path.exists(boxfile))
 
         d = wq.run_all_steps()
         def _check(res):
             self.failUnlessEqual(len(wq.dispatched_steps), 5)
             self.failUnlessEqual(wq.dispatched_steps[0][0], "upload_chk")
             self.failIf(os.path.exists(tmpfilename))
+            self.failIf(os.path.exists(boxfile))
         d.addCallback(_check)
         return d