]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_system.py: verify that we can replace files in place
authorBrian Warner <warner@allmydata.com>
Fri, 17 Aug 2007 00:03:50 +0000 (17:03 -0700)
committerBrian Warner <warner@allmydata.com>
Fri, 17 Aug 2007 00:03:50 +0000 (17:03 -0700)
src/allmydata/test/test_system.py

index c369dcc13c6ee3a1992f9870d0498aef6884706f..82a6c6fa39246d05ca4d2b9de4f35334eb4085ec 100644 (file)
@@ -576,6 +576,12 @@ class SystemTest(testutil.SignalMixin, unittest.TestCase):
         d.addCallback(lambda res: self.GET("vdrive/global/subdir3/new.txt"))
         d.addCallback(self.failUnlessEqual, "new.txt contents")
 
+        # can we replace files in place?
+        d.addCallback(lambda res: self.PUT("vdrive/global/subdir3/new.txt",
+                                           "NEWER contents"))
+        d.addCallback(lambda res: self.GET("vdrive/global/subdir3/new.txt"))
+        d.addCallback(self.failUnlessEqual, "NEWER contents")
+
         # TODO: mangle the second segment of a file, to test errors that
         # occur after we've already sent some good data, which uses a
         # different error path.